Upload timeouts after about 30 seconds

webmastersitesi nginx-forum at nginx.us
Sat Aug 24 19:24:58 UTC 2013


I've a problem with file upload and googling and checking with everything 
didn't help to solve it. 

The problem is when file is being uploaded larger than few megs browser 
repeats request after about 30 seconds, and on the second request after 
another 30-40s it throws connection reset and nginx has 408 error on that 
post request, no other errors in nginx nor in php. 

related settings to fiel upload are: 

    client_body_buffer_size   1m; 
    client_header_buffer_size 128k; 
    client_max_body_size      1000m; 

    client_body_timeout   500; 
    client_header_timeout 500; 
    keepalive_timeout     500 500; 
    send_timeout          500; 

    keepalive_requests      100; 
    tcp_nodelay on; 
    reset_timedout_connection on; 

server works with php (php-fpm) with socket. standart configuration. 

    client_max_body_size 42m; 

memory_limit = 64M 
post_max_size = 40M 
upload_max_filesize = 32M 

it works fine for me with that settings. I havent speficied any timeout 
settings you used. 
Have you edited php.ini for php-fpm? If not - default upload file size is 2M

Posted at Nginx Forum:

Of course I set correct php settings settings: 

memory_limit => 512M 
post_max_size => 1000M 
upload_max_filesize => 1000M

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,242188,242188#msg-242188

More information about the nginx mailing list