E
E
endshpile2011-01-26 10:59:55
PHP
endshpile, 2011-01-26 10:59:55

Hanging php-fpm?

environment: Debian Lenny, nginx, php-fpm (VDS: 720 MHz/384 Mb/12 Gb)
php often hangs up with an error in the logs:
[pool www] server reached max_children setting(50), consaider raising it
only helps restart php, the captain obviously tells you to do what they ask, i.e. increase the number of children, but actually there are two questions:
1. If all the children are busy, then why does php crash? Logically, nginx should issue a 503 error and wait for free processes
2. How to calculate the optimal number of children for vds?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
homm, 2011-01-26
@homm

The optimal number depends on the project, but 50 is much more than needed for the given configuration.
When there are so many children, what are they doing? Can they wait for a response from external services that do not respond to them for a long time?

A
Alexander, 2011-01-26
@akalend

The optimal number of PHP children is determined practically,
theoretically it should be x2 nginx children.
Look at the time spent on working out one script.
If the scripts are heavy, and you need to get rid of this as soon as possible, then the children of PHP should be equal to the ratio of script processing and the frequency of incoming requests with a margin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question