简体   繁体   中英

nginx rst packet after sending http response

I´m using nginx 1.10.3.

What I´m trying to force is the following scenario:

1.2.3. Client <--> Server | TCP 3 way tcp handshake

  1. Client --> Server | HTTP GET
  2. Server --> Client | TCP ACK
  3. Server --> Client | HTTP response
  4. Server --> Client | TCP RST, ACK

I try to provoke sending an RST packet after responding the http get request. For this purpose I set the "lingering_close off" configuration parameter in the nginx_conf file, but without success. Is there another way to provoke this kind of scenario?

Recently we also meet similar scenario: there are many 'Broken pipe' errors in our application error log.

And after analysis of tcp transport info, we found sometimes nginx will send a 'RST' immediately after it send FIN to upstream server. Final conclusion, the reason of this behavior we think is when the client close the connection to the nginx, the nginx will close the relative upstream connection and not wait the upstream to execute the rest task.

So according to the nginx document, we aad the config proxy_ignore_client_abort on to the nginx config file. Reference: http://nginx.org/

ps Our nginx version is 1.12.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM