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
    Commented Feb 3, 2017 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. Commented Feb 4, 2017 at 2:04
  • 1
    Did you check nginx's timeout parameters? proxy_read_timeout, proxy_send_timeout those are default set to 60s.
    – unNamed
    Commented Mar 3, 2017 at 17:39
  • yeah actually that's the solution that worked but I missed updating the answer here. Commented Mar 5, 2017 at 20:12

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .