Welcome! Log In Create A New Profile

Advanced

Unbreakable 90 sec timeout

February 04, 2011 05:11PM
Hello.

I'm spent half day to googling, reading documentation and try...

I have simple file to test what just sleep 120 second:
[code]
<?
sleep(120);
echo 'Done';
file_put_contents('test.date', date('c'));
?>
[/code]

But nginx (binary Debian package) always fired error 504: [code]
504 Gateway Time-out
nginx/0.6.32
[/code]
after 90 seconds timeout.

In try solve problem I set to big values many timeout directives:
[code]
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
fastcgi_read_timeout 600;
client_body_timeout 600;
client_header_timeout 600;
send_timeout 600;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
[/code]
but unfortunately it does not helps.

Full config used:
[code]server {
listen 11.22.33.44:80;
server_name example.com www.example.com;

proxy_connect_timeout 1600;
proxy_send_timeout 1600;
proxy_read_timeout 1600;

fastcgi_read_timeout 1600;
client_body_timeout 1600;
client_header_timeout 1600;
send_timeout 1600;

fastcgi_connect_timeout 1600;
fastcgi_send_timeout 1600;

access_log /var/www/site/logs/nginx_access.log;
error_log /var/www/site/logs/nginx_error.log;

location / {
proxy_pass http://127.0.0.1:8080;
include /etc/nginx/proxy.conf;
proxy_temp_path /var/nginx/proxy_temp;
root /var/www/site/www/;
}

location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|html|htm|mp3)$ {
root /var/www/site/www/;
access_log off;
expires 30d;
}
}
[/code]

What is also may be interesting - if directly ask Apache which act there as frontend - script work. Even via nginx script also run to end - date in file updated each time despite 504 error produced for user.

What more can I tune?

With best wishes, Pavel Alexeev.
Subject Author Posted

Unbreakable 90 sec timeout

Hubbitus February 04, 2011 05:11PM

Re: Unbreakable 90 sec timeout

DeineAgentur February 08, 2011 09:21AM

Re: Unbreakable 90 sec timeout

DeineAgentur February 08, 2011 09:23AM

Re: Unbreakable 90 sec timeout

Hubbitus February 09, 2011 04:58AM

Re: Unbreakable 90 sec timeout

Antoine BONAVITA February 09, 2011 08:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
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