Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have nginx as my web server with latest php 5.3.8. I run a scrapper script and I get this error

2011/09/03 07:39:36 [error] 1449#0: *1 upstream timed out (110: Connection timed out) while reading upstream, client:, server: www.deliciousmanga.com, request: "GET /wpm-crn/scp/?tkn=uVXcaozY70AfJgbVGy0z HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.deliciousmanga.com", referrer: "http://www.deliciousmanga.com/wp-admin/admin.php?page=wp-manga/mng/scp/mgr"

To fix this error I had to add Code:

fastcgi_connect_timeout 60; 
fastcgi_send_timeout 180; 
fastcgi_read_timeout 180;

But when I do add these options it causes the site not responding all it does is load forever and in the end it would just say Bad gateway 504. The vps is running fine but it's just the site doesn't respond/load.

this is my nginx config

server {
    server_name www.deliciousmanga.com deliciousmanga.com;
    access_log /srv/www/deliciousmanga.com/logs/access.log;
    error_log /srv/www/deliciousmanga.com/logs/error.log;
    root /srv/www/deliciousmanga.com/public_html;

    location / {
        index index.html index.htm index.php;

        location ~ \.php$ {
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
                fastcgi_pass unix:/var/run/php5-fpm.sock;

if (!-e $request_filename) {
  rewrite ^.*$ /index.php last;

fastcgi_connect_timeout 60; 
fastcgi_send_timeout 180; 
fastcgi_read_timeout 180; 
share|improve this question
any php error ?, how many mb your memory_limit on php.ini setting ? –  chocripple Sep 4 '11 at 6:08
what do your logs say ? –  Iain Sep 4 '11 at 7:36
Nginx config looks OK and the error message you are getting is PHP process timing out - this isn't uncommon with scrapers. –  c2h5oh Oct 9 '12 at 22:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.