[php-src] Issue #14548: New config to adjust timeouts between NGINX and PHP-FPM (fix PHP zombie process)
| From: | diogoscota | Date: | Wed, 12 Jun 2024 18:02:12 +0000 |
| Subject: | [php-src] Issue #14548: New config to adjust timeouts between NGINX and PHP-FPM (fix PHP zombie process) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247083@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/14548
Author: diogoscota
### Description

Hi,
I have a question that I haven't found the answer online. I made this graph to illustrate the
situation. When there are many requests waiting in the backlog queue (because the workers are busy),
a time desynchronization happens between NGINX and PHP-FPM.
**The PHP-FPM continues getting the requests from the backlog queue even though NGINX has already
answered the client with 504 response.**
This is a waste of resources, as the PHP result will never reach NGINX, as NGINX has already
responded to the request with 504 to the client
When this happens the new requests receives a timeout because they go to the end of the queue and
are processed with delay
If there is a configuration that takes into account the time that the process spends in the backlog
queue, these "zombie" processes do not even need to be processed if they have already
reached the timeout limit