You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
max_execution_time counts wall time on ZTS builds, CPU time elsewhere #25499
max_execution_time should mean the same thing whatever the build. Today it counts CPU time on Linux, as the manual says ("database queries, etc. is not included"), but wall time on builds with Zend Max Execution Timers, on by default for ZTS on Linux and FreeBSD, since #10141 switched from CPU time during review.
This caught us by surprise moving a Symfony app from FPM to FrankenPHP: with the same php.ini, requests waiting for the lock of their session file started dying at 10 seconds, where FPM never counted that wait. A build option shouldn't redefine a setting everybody shares an understanding of.
timer_create() accepts CLOCK_THREAD_CPUTIME_ID on Linux, so these timers could count the CPU time of their thread, as setitimer() does everywhere else. A wall-time limit has its uses, but as its own setting, as proposed in https://wiki.php.net/rfc/max_execution_wall_time, not as a different meaning of this one.
FWIW, I think wall time probably makes more sense since it's easier to reason about with, and a lot of timeouts are going to be spent waiting on i.e. remote database servers, where you're waiting on reads/writes.
Activity
NattyNarwhal commentedon Nov 17, 2026
Note that some platforms can only do wall time regardless, it's a bit of a mess:
php-src/Zend/zend_signal.c
Line 66 in 4bc158b
Then you have hard timeout in NTS but not ZTS!
FWIW, I think wall time probably makes more sense since it's easier to reason about with, and a lot of timeouts are going to be spent waiting on i.e. remote database servers, where you're waiting on reads/writes.