Welcome! Log In Create A New Profile

Advanced

504 Timeout when running PHP script

March 16, 2010 06:08AM
I have a PHP script that processes a folder of images, it takes quite a while to do this, but should produce output as it goes along. But when running this script I get a 504 Timeout, probably after 60s. The script also appears to stop running, so I end up with some database records written, and others not. (Does nginx send a signal to the fastcgi process to tell it to stop what it's doing and get on with the next request?)

I checked the Nginx logs for the site, and weirdly there wasn't anything in there about the timeout (I'm using the default error log level).

I'm running PHP as fastcgi, the relevant section of the Nginx config is:
[code]
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /home/djeyewater/SSI/davidkennardphotography/.htpasswd;

#rewrite any .xhtml page to page.php
rewrite ^/(.+)\.xhtml$ /$1.php;
}

location /admin/batch-upload.php {
auth_basic "Restricted";
auth_basic_user_file /home/djeyewater/SSI/davidkennardphotography/.htpasswd;
add_header Cache-Control "private, must-revalidate";
fastcgi_read_timeout 1200;
fastcgi_pass unix:/home/djeyewater/webapps/php/php.sock;
}

location ~ ^/admin/.*\.php {
auth_basic "Restricted";
auth_basic_user_file /home/djeyewater/SSI/davidkennardphotography/.htpasswd;
add_header Cache-Control "private, must-revalidate";
fastcgi_read_timeout 120;
fastcgi_pass unix:/home/djeyewater/webapps/php/php.sock;
}
[/code]
And I'm accessing the page as /batch-upload.xhtml

Thanks

Dave
Subject Author Posted

504 Timeout when running PHP script

djeyewater March 16, 2010 06:08AM

Re: 504 Timeout when running PHP script

Alexander Vogt March 16, 2010 07:56AM

Re: 504 Timeout when running PHP script

djeyewater March 17, 2010 07:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 189
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready