Proxy module connection timeout during file upload
tommy
nginx-forum at nginx.us
Tue Sep 8 21:45:28 MSD 2009
Hi,
I use nginx in front of apache using the proxy module. I want to upload a 2 MB file which is then processed by apache+php. Processing takes about 3 minutes. After aprox 71 to 75 seconds nginx terminates the connection.
Error_log:
2009/09/08 19:27:07 6644#0: *1890 a client request body is buffered to a temporary file /usr/local/nginx-0.7.61/client_body_temp/0000000000, client: 10.228.115.254, server: _, request: "POST /Cooperations/ HTTP/1.1", host: "upload.mydomain.net", referrer: "http://upload.mydomain.net/Cooperations/CodeGeneratorCampaign/1/de/8"
2009/09/08 19:28:18 6644#0: *1890 upstream prematurely closed connection while reading response header from upstream, client: 10.228.115.254, server: _, request: "POST /Cooperations/ HTTP/1.1", upstream: "http://127.0.0.1:8060/Cooperations/", host: "upload.mydomain.net", referrer: "http://upload.mydomain.net/Cooperations/CodeGeneratorCampaign/1/de/8"
First message appears when fileupload is done. The second is the abort.
Here my nginx settings:
http {
sendfile on;
tcp_nopush on;
keepalive_timeout 0;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server_names_hash_bucket_size 128;
server_tokens off;
....
.....
server {
.....
location / {
.....
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 190;
proxy_send_timeout 190;
proxy_read_timeout 190;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}
}
Thx + KR,
Tommy
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,5991,5991#msg-5991
More information about the nginx
mailing list