Repository navigation
test: adapt to the PHP hard memory limit - #2741
Merged
Merged
Conversation
PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 exit the process when an allocation exceeds twice memory_limit, and no longer fail request startup on OOM. Stay under the hard limit and cover worker mode too.
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.
PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 (php/php-src@31c0ea7d7f) replace the bailout on OOM with a delayed fatal error and add a hard memory limit, twice `memory_limit` by default (`memory_hard_limit_percent`). An allocation past it prints "Hard memory limit ... exhausted" and calls `_exit(137)`.
`TestUnhealthyThreadIsRestarted` sent a 16 MiB query string with `memory_limit=8M`: `php_default_treat_data()` copies it in one allocation, which crosses the 16 MiB hard limit and kills the test binary. This is why Tests and Windows are red on main since these releases.