Repository navigation
Remove PHP-FPM's 30 second CPU time limit - #365
Merged
Merged
Conversation
PHP-FPM defaulted to max_execution_time=30 (CPU time), whatever the Lambda function's timeout: a CPU-heavy request in a function with a longer timeout failed after 30 seconds of CPU. Bref already stops requests before the Lambda timeout.
mnapoli
added a commit
to brefphp/bref
that referenced
this pull request
Nov 24, 2026
The layers now set max_execution_time=0 (brefphp/aws-lambda-layers#365).
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.
max_execution_timewas not set in the layers, so PHP-FPM used PHP's default: 30 seconds. On Linux, that limit counts CPU time only, whatever the timeout of the Lambda function. A CPU-heavy request (PDF generation, a spreadsheet export…) in a function withtimeout: 120failed withMaximum execution time of 30 seconds exceededafter 30 seconds of CPU.It also never helped with real timeouts: waiting for a database or an API doesn't count as CPU time. Bref already stops PHP-FPM requests 1 second before the Lambda timeout, counting the time spent waiting, and brefphp/bref#2316 makes network calls fail before that.
The CLI is unchanged: it has no limit. Applications can still set a limit in
php/conf.d.Behaviour change, hence v4 only.