Php-fpm requests eventually goes to queue !!

shahzaib shahzaib shahzaib.cb at gmail.com
Thu May 22 15:08:44 UTC 2014


Thanks, my math is not wrong my concept about php-fpm was wrong. I was
thinking each child can handle 40000 requests/sec. :(


On Thu, May 22, 2014 at 7:52 PM, Reinis Rozitis <r at roze.lv> wrote:

> pm.max_children = 250
>> pm.start_servers = 40
>> pm.max_requests = 40000
>>
>
>  Any clue why requests are still getting into php-fpm  queue and max
>> children also reached errors occuring, even max_children are 250 * 40000. ??
>>
>
>
> Your math is wrong - there is no such 250 * 40000, because pm.max_requests
> is just a number of requests after which the php child restarts (to avoid
> possible memory leak etc (it may also be 0)).
>
> Your (maximum simultaneously running) concurrent requests are still 250
> (~pm.max_children), so bassically if your request takes longer than 1
> second and there are more than 250 requests per second you will end up with
> a queue.
>
>
> You either speed up the php code (and everything besides it) / increase
> the FPM pool (more children or more pools/fpm backends) or use caching like
> some frontend cache (varnish/squid etc) or nginx with fastcgi_cache.
>
> rr
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140522/90920a10/attachment.html>


More information about the nginx mailing list