nginx blocking during long running PHP request?

mike mike503 at gmail.com
Thu Feb 26 08:01:57 MSK 2009


Are you using something that runs php -b or spawn-fcgi? Obviously not  
php-fpm.

On Feb 25, 2009, at 6:56 PM, Merlin <merlin at mahalo.com> wrote:

> You may need to look at your fastcgi setup and see how many children  
> and requests you have available.
>
> # more /etc/default/php-fastcgi
> # Should php-fastcgi run automatically on startup? (default: no)
> START=yes
>
> # Which user runs PHP? (default: www-data)
> EXEC_AS_USER=www-data
>
> # Host and TCP port for FASTCGI-Listener (default: localhost:9000)
> FCGI_HOST=localhost
> FCGI_PORT=9000
>
> # Environment variables, which are processed by PHP
> PHP_FCGI_CHILDREN=4
> PHP_FCGI_MAX_REQUESTS=1024
>
>
> On Wed, Feb 25, 2009 at 6:17 PM, Rt Ibmer <rtibmx at yahoo.com> wrote:
> 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_pass  127.0.0.1:8888;
>        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!
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090225/604072be/attachment.html>


More information about the nginx mailing list