0

I'm encountering an issue with my PHP-FPM and Nginx setup where a PHP-FPM worker is being terminated due to the request_terminate_timeout setting, but the termination doesn't seem to correspond to the start time of the most recent request. Here are my configurations:

Nginx configuration:

fastcgi_keep_conn on;

PHP-FPM configuration:

pm = static
pm.max_children = 100
pm.max_requests = 1000
request_slowlog_timeout = 2s
request_terminate_timeout = 12s

Issue:

I observed that a worker was terminated at the 12-second mark, even though the request it was handling at that moment had started only 4 seconds earlier. Also there was another request that came from the same source exactly before 12 sec before the termination and was handled (successfully) by the same worker. This led me to question whether request_terminate_timeout is being applied cumulatively across multiple requests handled by the same worker or if there might be another factor at play.

My understanding:

From the official PHP-FPM documentation, it seems that request_terminate_timeout should apply to each individual request. However, the observed behavior suggests otherwise.

Question:

Is request_terminate_timeout in PHP-FPM applied per individual request or cumulatively across multiple requests for the same worker?

Any insights or suggestions would be greatly appreciated. Thank you!

0

Browse other questions tagged or ask your own question.