# Dropped https client connection doesn't drop backend proxy\_pass connection

**URL:** <https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429>\
**Category:** NGINX\
**Created:** [March 15, 2013, 5:23am UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429 "2013-03-15T05:23:14Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [May 20, 2014, 6:58am UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/21 "2014-05-20T06:58:42Z")

</div>

On Monday 19 May 2014 17:32:07 newnovice wrote:

> I tried with: " proxy\_pass\_header Connection;" – which  
> should do this according to documentation: “Permits passing otherwise  
> disabled header fields from a proxied server to a client.”  
> (from upstream\_server to client)

No, it shouldn’t. If you will follow the link from “otherwise  
disabled”,  
you will see the full list of such headers, that can be specified.

I wrote in general, not about the “Connection” header.

> But this did not pass thru the Connection header coming from the  
> upstream\_server to the client of this proxy.
> 
> Valentin, can you please elaborate on how you suggest doing this: "I can try

Sorry, typo: s/I can/You can/

> by using combination of add\_header and $upstream\_http\_\* variables." ???
> 
> are you saying this ‘variable’ can be developed to pass on the  
> upstream\_http\_connection header in the response ???

> **[$upstream\_http\_ - Module ngx\_http\_upstream\_module](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#var_upstream_http_)**

wbr, Valentin V. Bartenev

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [May 19, 2014, 5:10pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/22 "2014-05-19T17:10:58Z")

</div>

thanks/

use the lua-module

it is possible?

19.05.2014 18:47, Valentin V. Bartenev пишет:

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [May 20, 2014, 8:05am UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/23 "2014-05-20T08:05:45Z")

</div>

1. Where can i get a full list of these disabled headers:  
“By default, nginx does not pass the header fields “Date”, “Server”,  
“X-Pad”, and “X-Accel-…” from the response of a proxied server to a  
client. The proxy\_hide\_header directive sets additional fields that will  
not  
be passed. If, on the contrary, the passing of fields needs to be  
permitted,  
the proxy\_pass\_header directive can be used.”

2. Can you suggest how I can accomplish preserving and passing on  
Connection  
and Keep-Alive headers from upstream server to client. I am not sure I  
follow: “using combination of add\_header and $upstream\_http\_\* variables”

Thanks a lot!

Posted at Nginx Forum:

> **[Re: Dropped https client connection doesn't drop backend proxy\_pass connection](https://forum.nginx.org/read.php?2,237386,250224#msg-250224)**
>
> Hi I'm trying to setup nginx to proxy a server sent events connection (http://dev.w3.org/html5/eventsource/) to a backend server. The approach is the browser connects to a particular path, which then checks the cookies to see the connection is...

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [July 13, 2015, 6:03pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/24 "2015-07-13T18:03:37Z")

</div>

Any update on this? Seeing this problem with nginx leaving connections  
open  
on AWS Beanstalk using nginx to proxy to puma/ruby on rails.

nginx version: nginx/1.6.2

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](http://aws.amazon.com/amazon-linux-ami/)”  
Amazon Linux AMI release 2015.03

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:

> **[Re: Dropped https client connection doesn't drop backend proxy\_pass connection](https://forum.nginx.org/read.php?2,237386,260255#msg-260255)**
>
> Hi I'm trying to setup nginx to proxy a server sent events connection (http://dev.w3.org/html5/eventsource/) to a backend server. The approach is the browser connects to a particular path, which then checks the cookies to see the connection is...

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [July 14, 2015, 3:24pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/25 "2015-07-14T15:24:41Z")

</div>

On Monday 13 July 2015 12:02:44 dgobaud wrote:

> Any update on this? Seeing this problem with nginx leaving connections open  
> on AWS Beanstalk using nginx to proxy to puma/ruby on rails.  
> [..]

Do you have cache or proxy store configured?

wbr, Valentin V. Bartenev

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [July 14, 2015, 5:50pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/26 "2015-07-14T17:50:44Z")

</div>

Don’t think so - config is below and the relevant url is  
/dashboard\_stream

```
  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 / {
      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;  
}

```
    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;  
}  
}

## Valentin V. Bartenev Wrote:

> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,237386,260281#msg-260281](http://forum.nginx.org/read.php?2,237386,260281#msg-260281)

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [July 14, 2015, 7:36pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/27 "2015-07-14T19:36:29Z")

</div>

Hello!

On Tue, Jul 14, 2015 at 12:43:53PM -0400, dgobaud wrote:

> I also just tested regular http and it is having the same problem.

First of all, please clarify what’s the problem you are seeing.  
That is, please provide details/stats/logs that show the problem.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [July 14, 2015, 6:44pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/28 "2015-07-14T18:44:28Z")

</div>

I also just tested regular http and it is having the same problem.

## dgobaud Wrote:

> worker tier  
> }  
> }
> 
> > Do you have cache or proxy store configured?
> > 
> > wbr, Valentin V. Bartenev
> > 
> > * * *
> > 
> > nginx mailing list  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,237386,260283#msg-260283](http://forum.nginx.org/read.php?2,237386,260283#msg-260283)

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [July 15, 2015, 1:05pm UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/29 "2015-07-15T13:05:03Z")

</div>

Hi! Thanks for replying. It appears the issue might actually be on the  
AWS  
side. AWS is looking into it. Think its an issue with the elastic load  
balancer.

Posted at Nginx Forum:

> **[Re: Dropped https client connection doesn't drop backend proxy\_pass connection](https://forum.nginx.org/read.php?2,237386,260318#msg-260318)**
>
> Hi I'm trying to setup nginx to proxy a server sent events connection (http://dev.w3.org/html5/eventsource/) to a backend server. The approach is the browser connects to a particular path, which then checks the cookies to see the connection is...

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [January 28, 2016, 5:16am UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/30 "2016-01-28T05:16:40Z")

</div>

Any update on this issue? Is there a fix I can apply on the AWS side?

Posted at Nginx Forum:

> **[Re: Dropped https client connection doesn't drop backend proxy\_pass connection](https://forum.nginx.org/read.php?2,237386,264195#msg-264195)**
>
> Hi I'm trying to setup nginx to proxy a server sent events connection (http://dev.w3.org/html5/eventsource/) to a backend server. The approach is the browser connects to a particular path, which then checks the cookies to see the connection is...

---

<div class="post-metadata">

**Author:** ![Robert\_Mueller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Robert\_Mueller](https://www.ruby-forum.com/u/Robert_Mueller)\
**Post date:** [January 28, 2016, 7:59am UTC](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429/31 "2016-01-28T07:59:40Z")

</div>

Yes the answer is on the elastic load balancer you must use protocol TCP  
or  
SSL - not HTTP or HTTPS. The HTTP/HTTPS listeners keep the connections  
open  
for reuse…

Posted at Nginx Forum:

> **[Re: Dropped https client connection doesn't drop backend proxy\_pass connection](https://forum.nginx.org/read.php?2,237386,264196#msg-264196)**
>
> Hi I'm trying to setup nginx to proxy a server sent events connection (http://dev.w3.org/html5/eventsource/) to a backend server. The approach is the browser connects to a particular path, which then checks the cookies to see the connection is...

[Previous page](https://www.ruby-forum.com/t/dropped-https-client-connection-doesnt-drop-backend-proxy-pass-connection/227429.md?page=1)
