[ 
https://issues.apache.org/jira/browse/THRIFT-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420436#comment-13420436
 ] 

Dominik Psenner edited comment on THRIFT-1653 at 7/23/12 5:15 AM:
------------------------------------------------------------------

Howdie

It's probably not a bug, but rather common policy. Windows|Linux keeps ports 
open for about a minute after they have been used. Which means that if you have 
thousands of short sessions that are opened/closed very frequently the 
connection is being disposed of in the process, but the operating system keeps 
the handle open. There is a registry entry that configures the time that a 
closed socket is kept open in TIME_WAIT until it is really closed so that it is 
reusable by someone else. See here 
(http://msdn.microsoft.com/en-us/library/aa560610%28v=bts.20%29.aspx) or here 
(http://www.speedguide.net/articles/linux-tweaking-121 the section about 
"net.ipv4.tcp_fin_timeout").

This timeout historically is a value of exactly one minute (60s), but it can be 
lowered to 15 seconds (as far as the operating system supports it).

Cheers
                
      was (Author: nachbarslumpi):
    Howdie

It's probably not a bug, but rather common policy. Windows|Linux keeps ports 
open for about a minute after they have been used. Which means that if you have 
thousands of short sessions that are opened/closed very frequently the 
connection is being disposed of in the process, but the operating system keeps 
the handle open. There is a registry entry that configures the time that a 
closed socket is kept open in TIME_WAIT until it is really closed so that it is 
reusable by someone else. See here 
(http://msdn.microsoft.com/en-us/library/aa560610%28v=bts.20%29.aspx) or here 
(http://www.speedguide.net/articles/linux-tweaking-121 the section about 
"net.ipv4.tcp_fin_timeout").

Cheers
                  
> TThreadedSelectorServer leaks CLOSE_WAIT sockets 
> -------------------------------------------------
>
>                 Key: THRIFT-1653
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1653
>             Project: Thrift
>          Issue Type: Bug
>            Reporter: Mikhail Bautin
>
> We are using TThreadedSelectorServer in HBase regionserver. We are observing 
> that under high load thousands of sockets in the CLOSE_WAIT state are not 
> being cleaned up, leading to server crash. Is it possible that the sockets 
> are not being closed on the server side, or the process of closing sockets 
> closed by client is being starved on the server, because normal I/O takes 
> priority?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to