# Wiki updated with reset\_timedout\_connection

**URL:** <https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522>\
**Category:** NGINX\
**Created:** [July 15, 2011, 5:46pm UTC](https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522 "2011-07-15T17:46:46Z")\
**Posts on this page:** 5\
**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:** [July 15, 2011, 5:46pm UTC](https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522/1 "2011-07-15T17:46:46Z")

</div>

Hello,

I’ve updated the Wiki with a directive that was missing from the  
english version:  
[http://wiki.nginx.org/HttpCoreModule#reset\_timedout\_connection](http://wiki.nginx.org/HttpCoreModule#reset_timedout_connection)

I’ve used the translation provided by Google of the original  
documentation at:  
[http://sysoev.ru/nginx/docs/http/ngx\_http\_core\_module.html#reset\_timedout\_connection](http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#reset_timedout_connection)

The translation leaves quite a lot to be desired ☹

Can someone knowledgeable in Russian and/or Nginx internals verify  
this for correctness?

Thank you,  
— appa

---

<div class="post-metadata">

**Author:** ![SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/u/SSAntS_nio_PSPSAlm)\
**Post date:** [July 15, 2011, 7:24pm UTC](https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522/2 "2011-07-15T19:24:38Z")

</div>

This directive enables or disables resetting the connection upon  
timeout. When resetting the connection, before the socket is closed,  
the SO\_LINGER option is set to the socket with timeout value of 0, which  
forces RST packet to be sent to client upon closing the socket, while  
all memory associated with the socket is freed. This allows to avoid  
the situation when the already closed socket is in the FIN\_WAIT1 state  
with the loaded buffers.

The keepalive connections, after timeout, are closed in the usual way.

Posted at Nginx Forum:

> **[Re: Wiki updated with reset\_timedout\_connection.](https://forum.nginx.org/read.php?2,212456,212460#msg-212460)**
>
> Hello, I've updated the Wiki with a directive that was missing from the english version: http://wiki.nginx.org/HttpCoreModule#reset\_timedout\_connection I've used the translation provided by Google of the original documentation at: http://sysoev.ru/ng

---

<div class="post-metadata">

**Author:** ![SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/u/SSAntS_nio_PSPSAlm)\
**Post date:** [July 15, 2011, 8:12pm UTC](https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522/3 "2011-07-15T20:12:15Z")

</div>

On 15 Jul 2011 18h23 WEST, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Hello Andrejs,

> This directive enables or disables resetting the connection upon  
> timeout. When resetting the connection, before the socket is  
> closed, the SO\_LINGER option is set to the socket with timeout value  
> of 0, which forces RST packet to be sent to client upon closing the  
> socket, while all memory associated with the socket is freed. This  
> allows to avoid the situation when the already closed socket is in  
> the FIN\_WAIT1 state with the loaded buffers.
> 
> The keepalive connections, after timeout, are closed in the usual  
> way.

Thank you for your translation. Google translate really sucks ☹  
I ended up with this:

syntax: reset\_timedout\_connection [on|off]

default: reset\_timedout\_connection off

context: http, server, location

This directive enables or disables resetting the connection on  
timeout. When resetting the connection, before the socket is closed,  
the socket SO\_LINGER option is set with a 0 timeout, which forces a  
RST packet to be sent to the client upon closing the socket, thus  
freeing all memory associated with it. This prevents that a socket  
in the FIN\_WAIT1 state keep the buffers associated with it lying  
around.

Note that sockets with keepalive connections, after the defined  
timeout, are closed in the usual way.

I hope it’s clearer and more faithful to the original docs.  
— appa

---

<div class="post-metadata">

**Author:** ![SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/u/SSAntS_nio_PSPSAlm)\
**Post date:** [July 15, 2011, 8:21pm UTC](https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522/4 "2011-07-15T20:21:31Z")

</div>

## António P. P. Almeida Wrote:

> On 15 Jul 2011 18h23 WEST, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:

> This directive enables or disables resetting the  
> connection on  
> timeout. When resetting the connection, before  
> the socket is closed,  
> the socket SO\_LINGER option is set with a 0  
> timeout, which forces a  
> RST packet to be sent to the client upon closing

“the” RST packet, I think, since we mention what kind it is.

> the socket, thus  
> freeing all memory associated with it. This  
> prevents that a socket  
> in the FIN\_WAIT1 state keep the buffers  
> associated with it lying  
> around.

This prevents the socket in the FIN\_WAIT1 state, along with the buffers  
associated with it from lying around.

(“the socket” – since we’re talking about the specific socket)

Kudos on working with the English manual!

Andrejs

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,212456,212465#msg-212465](http://forum.nginx.org/read.php?2,212456,212465#msg-212465)

---

<div class="post-metadata">

**Author:** ![SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@SSAntS\_nio\_PSPSAlm](https://www.ruby-forum.com/u/SSAntS_nio_PSPSAlm)\
**Post date:** [July 15, 2011, 9:30pm UTC](https://www.ruby-forum.com/t/wiki-updated-with-reset-timedout-connection/209522/5 "2011-07-15T21:30:16Z")

</div>

On 15 Jul 2011 19h21 WEST, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> “the” RST packet, I think, since we mention what kind it is.

> This prevents the socket in the FIN\_WAIT1 state, along with the  
> buffers associated with it from lying around.
> 
> (“the socket” – since we’re talking about the specific socket)
> 
> Kudos on working with the English manual!

Done. I’ve learned a lot by reading and working on it.

> Andrejs

Thank you,  
António
