-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to limit worker execution time #1216
Comments
Is PHP in your case actually hanging during a request or while booting up the worker script? If PHP becomes unresponsive even though there's a |
In my case, PHP hangs while processing the request (at the application level). And yes, PHP does not respond to |
Was this solved? Just had a similar hang with a service running 1.3.3 where the |
There's a PR in the works right now that allows automatically scaling, starting and stopping threads #1266 (kind of what FPM does with processes, but we're using more lightweight threads instead). That PR should improve the 'hanging' when a database is not reachable. I'm planning to add more ways to timeout threads right afterwards. |
Currently, in worker mode, the execution time limit is entirely PHP's responsibility via the
max_execution_time
directive. However, there are cases when PHP does not react to the execution time exceeding this directive.One example of the problem of ignoring the
max_execution_time
directive was described in #1162: when connecting to an unavailable database, PHP hangs and stops following themax_execution_time
directive.This behavior leads to blocking workers until they finish. This eventually leads to "Connection timeout" errors.
Similar implementations already exist in:
Unlike the above implementations, FrankenPHP has the ability to communicate with PHP. It would be great if the execution time could also be configured from PHP code, or if FrankenPHP would react to the call to the
set_time_limit
function.The text was updated successfully, but these errors were encountered: