# Nginx resets connection

**URL:** <https://www.ruby-forum.com/t/nginx-resets-connection/204620>\
**Category:** NGINX\
**Created:** [March 17, 2011, 12:10am UTC](https://www.ruby-forum.com/t/nginx-resets-connection/204620 "2011-03-17T00:10:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 17, 2011, 12:10am UTC](https://www.ruby-forum.com/t/nginx-resets-connection/204620/1 "2011-03-17T00:10:55Z")

</div>

Hello,

I found a bug in the request finalization on linux:

If the server has a keep-alive set to 0 and the client sends pipelined  
requests which exeeds client\_header\_buffer\_size, nginx closes the  
connection and linux sends a TCP RST since there is still data in  
the TCP buffer of the kernel. This results in an incomplete transfer on  
the client site.

One possible solution would be to allow pipelined request even if  
keep-alive is set to zero. Another one would be to wait until the kernel  
receives the ACK for all pending data in the send buffer.

Regards,  
Gerhard

---

<div class="post-metadata">

**Author:** ![Gerhard\_Heift](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ecd19e/32.png) [@Gerhard\_Heift](https://www.ruby-forum.com/u/Gerhard_Heift)\
**Post date:** [March 17, 2011, 1:00pm UTC](https://www.ruby-forum.com/t/nginx-resets-connection/204620/2 "2011-03-17T13:00:09Z")

</div>

Hello!

On Thu, Mar 17, 2011 at 12:09:53AM +0100, Gerhard Heift wrote:

> One possible solution would be to allow pipelined request even if  
> keep-alive is set to zero. Another one would be to wait until the kernel  
> receives the ACK for all pending data in the send buffer.

Yes, thank you for report. Pipilining in nginx currently have  
some rough edges and need for lingering close is one of them.

Maxim D.
