nginx blocking during long running PHP request?
Merlin
merlin at mahalo.com
Thu Feb 26 05:56:36 MSK 2009
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/8b059d4f/attachment.html>
More information about the nginx
mailing list