<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" >Hi,</div>
<div dir="ltr" > </div>
<div dir="ltr" >We have a client that uses a half-close connection to get response from the server, but nginx closes the connection to the client without waiting for the response from server, even the proxy_ignore_client_abort is set to on. Without nginx in between, things work fine.</div>
<div dir="ltr" > </div>
<div dir="ltr" >Here are the events:</div>
<div dir="ltr" >1. Client establishes the connection (SYN, SYN ACK, ACK). </div>
<div dir="ltr" >2. Client closes _half_ of the connection by sending a FIN/ACK packet.</div>
<div dir="ltr" >3. Nginx receives the FIN/ACK from the client, forwards it to the server, and responds to the client with a FIN/ACK right afterwards, which closes the connection on its own.</div>
<div dir="ltr" >4. When server starts sending data to the client, nginx responds with a RST because the client side connection has been closed.</div>
<div dir="ltr" > </div>
<div dir="ltr" >Here is the config file I'm using:</div>
<div dir="ltr" > </div>
<div dir="ltr" ><div>events {<br> worker_connections 1024;<br>}</div>
<div>http {<br> upstream proxy {<br> keepalive 1;</div>
<div> server 172.17.0.1:8089;<br> }</div>
<div> map $http_upgrade $connection_upgrade {<br> default upgrade;<br> '' "";<br> }</div>
<div> server {<br> listen 7001;</div>
<div> proxy_ignore_client_abort on;</div>
<div> location / {<br> proxy_pass <a href="http://proxy" >http://proxy</a>;</div>
<div> proxy_set_header Connection $connection_upgrade;<br> proxy_set_header Upgrade $http_upgrade;<br> proxy_http_version 1.1;<br> }<br> }<br>}</div></div>
<div dir="ltr" > </div>
<div dir="ltr" >From the documentation, proxy_ignore_client_abort seems to be the perfect match for this scenario, but I'm not sure why it's not working for our setup.</div>
<div dir="ltr" > </div>
<div dir="ltr" >Any suggestion is appreciated!</div>
<div dir="ltr" > </div>
<div dir="ltr" >Thanks,</div>
<div dir="ltr" >Yun</div></div></div><BR>