# Nginx reload causing dropped requests

**URL:** <https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073>\
**Category:** NGINX\
**Created:** [January 21, 2011, 2:46am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073 "2011-01-21T02:46:40Z")\
**Posts on this page:** 7\
**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:** [January 21, 2011, 2:46am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/1 "2011-01-21T02:46:40Z")

</div>

Hi,

I’m seeing dropped requests on nginx reload. I’m using 0.8.53 compiled  
from  
source.

My configuration is nginx as a proxy in front of (currently) 2 apache  
servers.

It looks like if a client reuses a connection it had before the reload  
(HTTP/1.1 style), then the server doesn’t handle the request - from  
tcpdump,  
I see the TCP connection is just reset with no response.

Is this a known issue? Is there some configuration option to stop the  
old  
worker processes from dieing until the connections have all timed out?

Cheers,  
Mike

---

<div class="post-metadata">

**Author:** ![Mike\_Bell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@Mike\_Bell](https://www.ruby-forum.com/u/Mike_Bell)\
**Post date:** [January 21, 2011, 4:09am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/2 "2011-01-21T04:09:21Z")

</div>

Apologies - having looked closer I see the bug is with my python test  
client

- python’s httplib doesn’t notice nginx has closed the connection - it’s  
up  
to the application code to retry in this case.

Cheers,  
Mike

---

<div class="post-metadata">

**Author:** ![Mike\_Bell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@Mike\_Bell](https://www.ruby-forum.com/u/Mike_Bell)\
**Post date:** [January 21, 2011, 4:11am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/3 "2011-01-21T04:11:15Z")

</div>

Ive seen this happen too. Ive always accepted it as something that  
happens  
and not a bug. But yeah its an annoyance when you have a dynamically  
configured server.

---

<div class="post-metadata">

**Author:** ![Mike\_Bell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@Mike\_Bell](https://www.ruby-forum.com/u/Mike_Bell)\
**Post date:** [January 21, 2011, 4:12am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/4 "2011-01-21T04:12:30Z")

</div>

Ive seen it happen with google chrome a bit after reload (  
net::ERR\_EMPTY\_RESPONSE)

---

<div class="post-metadata">

**Author:** ![Mike\_Bell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@Mike\_Bell](https://www.ruby-forum.com/u/Mike_Bell)\
**Post date:** [January 21, 2011, 9:01am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/5 "2011-01-21T09:01:11Z")

</div>

On Fri, Jan 21, 2011 at 02:11:39PM +1100, SplitIce wrote:

> Ive seen it happen with google chrome a bit after reload (  
> net::ERR\_EMPTY\_RESPONSE)

How do you do reload ? Using -HUP signal ?

> > > I see the TCP connection is just reset with no response.  
> > > nginx mailing list  
> > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > > [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

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

–

[http://sysoev.ru](http://sysoev.ru)

---

<div class="post-metadata">

**Author:** ![Mike\_Bell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@Mike\_Bell](https://www.ruby-forum.com/u/Mike_Bell)\
**Post date:** [January 21, 2011, 9:03am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/6 "2011-01-21T09:03:04Z")

</div>

On Thu, Jan 20, 2011 at 05:45:21PM -0800, Mike Bell wrote:

> I see the TCP connection is just reset with no response.
> 
> Is this a known issue? Is there some configuration option to stop the old  
> worker processes from dieing until the connections have all timed out?

While reload (HUP signal) nginx closes only idle keepalive connections.

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Mike\_Bell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@Mike\_Bell](https://www.ruby-forum.com/u/Mike_Bell)\
**Post date:** [January 21, 2011, 9:27am UTC](https://www.ruby-forum.com/t/nginx-reload-causing-dropped-requests/202073/7 "2011-01-21T09:27:31Z")

</div>

Yep HUP via /etc/init.d/nginx reload . If I could reproduce it I would,  
Ive  
only seen it in chrome so it may be chrome incorrectly handling  
keepalive  
closure or something.
