New config to adjust timeouts between NGINX and PHP-FPM (fix PHP zombie process)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by investigating PHP-FPM backlog handling and its interaction with NGINX timeouts, as described in the issue. Determine whether the requested configuration behavior is feasible and define how it should handle requests that have already exceeded the client timeout. Done means an agreed configuration design with a validated timeout scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx, php
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100