Proxy module connection timeout during file upload

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

Hi,

one thing.

http://wiki.nginx.org/NginxHttpProxyModule#proxy_connect_timeout

says that it is not possible to have a connection that run longer than
75 seconds. How can I solve that. If this is the cause, where can I fix
this in source code?

KR,
tommy

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

On Tuesday, September 8, 2009 at 20:45:28, tommy wrote:

t> I use nginx in front of apache using the proxy module.
t> I want to upload a 2 MB file which is then processed by apache+php.
t> Processing takes about 3 minutes. After aprox 71 to 75 seconds nginx
terminates the connection.

t> 2009/09/08 19:28:18 6644#0: *1890 upstream prematurely closed
t> connection while reading response header from upstream, client:
t> 10.228.115.254, server: _, request: “POST /Cooperations/ HTTP/1.1”,
t> upstream: “http://127.0.0.1:8060/Cooperations/

no. this is apache prematurely terminates connection.
check apache error.log in /var/log/httpd/ for cause.

t> proxy_send_timeout 190;
t> proxy_read_timeout 190;

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs