nginx blocking during long running PHP request?

Rt Ibmer rtibmx at
Thu Feb 26 05:17:26 MSK 2009

I use nginx to frontend fastcgi and PHP.  I have a PHP page that accesses a mySQL db and executes a query which takes about 30 seconds to execute.

During that time, if I hit another php page on my site, the browser just spins and does not load the php page until the other php page finishes executing the query.

I am not sure if it is nginx blocking somehow, or perhaps PHP can only execute one page at a time (which would be a major bottleneck when we go to production - right now we are just testing).

Here is my location block that handles the PHP request:

 location ~ .*\.php$ {
        include fastcgi;
        fastcgi_read_timeout 180s;
        fastcgi_index index.php;
        fastcgi_intercept_errors  on;
        error_page  404         /404.php;
        root    html;

Am I missing a setting somewhere that is preventing nginx and/or PHP from executing on multiple requests simultaneously?  What other troubleshooting steps can I take?

Thank you!


More information about the nginx mailing list