Repository navigation
test: end the references without waiting for their requests - #3
Merged
Merged
Conversation
On SIGTERM, FrankenPHP waits without end for a script that still reads the body of an open connection, and proc_close() with it. The macOS job of PR 2 hung in GoNetHttp with FrankenPHP processes left, which fits. The references now end with SIGKILL; lingers() reads at most 5 seconds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
FrankenPhpReferenceends each FrankenPHP with SIGKILL, when it makes room for another one andwhen it stops.
GoReference::lingers()reads for at most 5 seconds.Why
The macOS job of #2, a docs-only change, hung in the
GoNetHttpsuite until the job's timeout of15 minutes; on
mainthe suite takes 2 minutes. FrankenPHP processes were still running at the end.Measured locally on macOS, with FrankenPHP 1.13.6: on SIGTERM, FrankenPHP waits without end for a
script that still reads the body of a connection that the client keeps open.
proc_close()waitswith it.
grace_period 1sin the Caddyfile does not end the wait; SIGKILL does:stop()with a request in progressThe hang of #2 did not happen again in four local runs of the suite, so this change bounds the
wait that fits it, without proof that it was the one. In
lingers(), a read that times out returns'', notfalse, so a Go that never closed would have held the suite too.Tests
composer testin Docker on Debian (PHP 8.4) and Alpine (PHP 8.5, locked and newest), on arm64 andamd64: 6 of 6 green, 627 tests each. Coverage 100.0 %. The
Connection,GoNetHttpandFrankenPhpsuites on macOS: 278 tests green.