Welcome! Log In Create A New Profile

Advanced

Re: proxy_ignore_client_abort on; not working as expected

Maxim Dounin
September 08, 2016 05:26PM
Hello!

On Thu, Sep 08, 2016 at 06:44:04PM +0000, Yun Wang wrote:

> Hi,
>
> 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.
>
> Here are the events:
> 1. Client establishes the connection (SYN, SYN ACK, ACK).
> 2. Client closes _half_ of the connection by sending a FIN/ACK packet.
> 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.
> 4. When server starts sending data to the client, nginx responds with
> a RST because the client side connection has been closed.
>
> Here is the config file I'm using:
>
> events {
> worker_connections 1024;
> }
> http {
> upstream proxy {
> keepalive 1;
> server 172.17.0.1:8089;
> }
> map $http_upgrade $connection_upgrade {
> default upgrade;
> '' "";
> }
> server {
> listen 7001;
> proxy_ignore_client_abort on;
> location / {
> proxy_pass [1]http://proxy;
> proxy_set_header Connection $connection_upgrade;
> proxy_set_header Upgrade $http_upgrade;
> proxy_http_version 1.1;
> }
> }
> }
>
> 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.
>
> Any suggestion is appreciated!

Your config suggests that you are probably see the problem with
the upgraded connections. Upgraded connections are closed
once any party (either client or server) closes the connection and
there are no pending data. The proxy_ignore_client_abort
directive doesn't apply to upgraded connections.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

proxy_ignore_client_abort on; not working as expected

Yun Wang 451 September 08, 2016 02:46PM

Re: proxy_ignore_client_abort on; not working as expected

Maxim Dounin 883 September 08, 2016 05:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 201
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready