Keepalive_timeout, proxy_send_timeout, and proxy_read_timeout ignored

Hi, I’m using AWS Beanstalk with nginx in front of a Puma server serving
Ruby on Rails. I have one URL that is for an EventSource so it is kept
alive
and data is streamed out. I was running into this problem
Dropped https client connection doesn't drop backend proxy_pass connection where when the client
closes
the browser but nginx keeps the connection alive forever so I tried
having
nginx automatically close the connection after 5 seconds. I set
keepalive_timeout, proxy_send_timeout, and proxy_read_timeout all to 5
seconds but all were ignored. The connection remained open until nginx
was
restarted.

nginx config

upstream my_app {
server unix:///var/run/puma/my_app.sock;
}

server {
listen 80;
server_name _ localhost; # need to listen to localhost for worker tier

if ($http_x_forwarded_proto = “http”) { return 301
https://$host$request_uri; }

location /dashboard_stream {
proxy_pass http://my_app; # match the name of upstream directive
which
is defined above
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_cache off;
proxy_http_version 1.1;
proxy_set_header Connection ‘’;
chunked_transfer_encoding off;
keepalive_timeout 5s;
proxy_send_timeout 5s;
proxy_read_timeout 5s;
}
}

nginx version

nginx version: nginx/1.6.2

AWS linux version

NAME=“Amazon Linux AMI”
VERSION=“2015.03”
ID=“amzn”
ID_LIKE=“rhel fedora”
VERSION_ID=“2015.03”
PRETTY_NAME=“Amazon Linux AMI 2015.03”
ANSI_COLOR=“0;33”
CPE_NAME=“cpe:/o:amazon:linux:2015.03:ga”
HOME_URL=“AWS | Amazon Linux AMI
Amazon Linux AMI release 2015.03

kernel version

Linux ip-172-31-12-138 3.14.42-31.38.amzn1.x86_64 #1 SMP Wed May 13
20:33:05
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Posted at Nginx Forum:

In modern times, with all the marketplace increasing countless design
renovations, wrist watches can be around appropriate downloads on the
genuine. How come primarily near, it’s possible to think about.
Considering that entire concept of watches would be to create a
reasonably priced products, a solution which can be appreciated through
just about all see fanciers, not only through the loaded handful of.
Thinking that signifies that gold and silver coins which include jewelry
or possibly platinum eagle are superceded by using the highest quality
chrome steel. Other than in which, all kinds of things through
manufactured along with the greatest attention, in order to make each
individual start looking, believe and additionally deliver the results
enjoy it has the real comparable version. The simple truth is lots of
webpages merchandising looks after since they are promoting very well.
The reason might these distribute which means that nicely in the event
top quality has been a major problem? Precisely why would most likely
individuals continuously revisit get a great deal more any time
displeased with each other? The challenge in fact is which should you
not may well decline a few fantastic thousand $ $ $ $, or perhaps tons
of for an addition, wristwatches would be the perfect substitute for you
personally. Together with actually, regardless if My partner and i which
usually sort of income to shell out, I had created get unlikely to try
it again. Exactly why invest 12 or maybe hundred dollars days more about
something which is definitely plainly cost-effective? An existing close
friend of excavation as a result of secondary education just got their
self a watch, given that exactly what greater observe comes improved
with other individuals? Sure, my super cool buddy Charles is rather
successful. She appeared to be boasting very much together with his
cutting edge order, on the subject of the point that it will be a real
confined element etc ., that we thought i would model your ex boyfriend
in addition to When i dictated a watch intended for by myself, since i
won’t be able to afford the first.
http://www.attrinity.com
http://www.watchesbuy.co.uk
http://www.waxwatchreplicas.co.uk