The Bugs Were Our Own Linker Wraps: Making a PHP Timeout Actually Time Out
max_execution_time did nothing in ePHPm because we had wrapped zend_set_timeout to a no-op. The SDK already had per-thread timers. We just had to stop switching them off.
In the stack guard post the villain was a -Wl,--wrap linker
flag that turned off PHP’s C-stack overflow guard. It wasn’t the only one. Until August, max_execution_time did
nothing in ePHPm on Linux, for the same reason. We had wrapped the function that arms
it to a no-op. A runaway script ran until the HTTP layer’s request timeout gave up on it and sent a 504. The PHP thread
kept burning CPU after that.
