I have an Ubuntu server with Nginx and PHP5-FPM in which the settings are as follows:

pm = dynamic
pm.max_children = 6
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 6
;pm.process_idle_timeout = 10s;
pm.max_requests = 200

emergency_restart_threshold = 5
emergency_restart_interval = 1m
process_control_timeout = 10

In this server 4 sites and one applications is running and this application works in such a way that it is used for sending continues status updates and acknowledging it.

The issue is in which when the application is not getting acknowledge, the application continuously goes to infinite wait status and all php process is used by this application and all other sites goes down. Then we need to restart php5-fpm process to fix this. Then after few minutes again all process is used by this application.

So please let us know is there any option to fix this issue? Also is there any option to allocate only 3 php process to this application so that only these allocated process goes to infinite loop and other 3 process can manage sites so that sites will not goes down.

Can anyone please guide us?

  • instead of working arround the problem, fix the ack issue. If the app cannot ack define what should happen with the data. Or make it not fail the ack in the first place (other place needs more resources etc.) – Dennis Nolte Dec 11 '14 at 8:52

You can create different fpm pools listening on different ports (or unix sockets) and assing different sites or even different locations or applications to use these pools. This way whan one pool is saturated with some laggy script, others won't be affected.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.