I can change the number of threads but my question is something completely orthogonal to what you replied. Why did the two server requests to php-fpm get serialized and not happen in parallel even though there are enough worker threads?<br>
<br><div class="gmail_quote">On Sun, Sep 26, 2010 at 11:17 PM, mat h <span dir="ltr"><<a href="mailto:mat999@gmail.com">mat999@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
nginx doesnt need 100+ threads, it uses an event worker model. Set<br>
your worker_processes to something more reasonable. If you are trying<br>
to handle 150 requests then you really only need a single worker.<br>
<div><div></div><div class="h5"><br>
On Mon, Sep 27, 2010 at 4:05 PM, Ankur Gupta <<a href="mailto:ankur655@gmail.com">ankur655@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I have a bunch of nginx and php-fpm worker threads. I am running a<br>
> very simple test with a script doing: <? sleep(20); ?>. I notice that<br>
> if I make two requests at the same time (from the same IP address), they get<br>
> serialized on the<br>
> php-fpm side and have a twenty second differential. Why would this<br>
> happen and the two requests not get processed in parallel when there<br>
> are an abundant number of threads? Here are the two requests in the<br>
> slow log file and they have a twenty second difference:<br>
><br>
> Sep 26 19:02:38.177091 pid 13597 (pool default)<br>
> script_filename = /var/www/test1/test.php<br>
> [0x00000000095b5280] sleep() /var/www/test1/test.php:2<br>
><br>
> Sep 26 19:02:58.321560 pid 13609 (pool default)<br>
> script_filename = /var/www/test1/test.php<br>
> [0x000000000942a890] sleep() /var/www/test1/test.php:2<br>
><br>
> I have 100+ nginx threads<br>
> $ ps -afe | grep nginx | wc -l<br>
> 120<br>
><br>
> and 150 php-fpm threads<br>
> $ ps -afe | grep php-fpm | wc -l<br>
> 150<br>
><br>
><br>
> Thanks,<br>
> Ankur<br>
</div></div>> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
><br>
><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br>