0

I have a java servlet environment that intentionally keeps an http connection open and sending data to a client. This connection is getting dropped after 50 seconds, I tried different settings in the nginx.conf file but none of those have worked.

I'm getting this error.

upstream timed out (110: Connection timed out) while reading response header from upstream, client: {Some IP}, server: , request: "GET /{some path} HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "sadfdsa.us-west-1.elb.amazonaws.com"

4
  • What is your ELB's connection timeout? – Alex Feb 3 '17 at 22:13
  • Thats one of the things I already tried, I increased it to 120 seconds from 60 which was the default but still nothing. – gerfmarquez Feb 4 '17 at 2:04
  • 1
    Did you check nginx's timeout parameters? proxy_read_timeout, proxy_send_timeout those are default set to 60s. – unNamed Mar 3 '17 at 17:39
  • yeah actually that's the solution that worked but I missed updating the answer here. – gerfmarquez Mar 5 '17 at 20:12
1
Syntax:     proxy_send_timeout time;
Default:    proxy_send_timeout 60s;
Context:    http, server, location
The timeout is set only between two successive write operations, not for the transmission of the whole request.

Syntax:     proxy_read_timeout time;
Default:    proxy_read_timeout 60s;
Context:    http, server, location
The timeout is set only between two successive read operations, not for the transmission of the whole response.

Editing those obviously helped the asker.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.