time_wait prevents a scenario where the same ip/port would re-connect, and then a delayed packet from a previous connection would arrive late, and be inadequately accepted by the new connection.
Since I observe a relation beetween a great number of threads and smtprcv crashes, I could imagine two scenarii 1. time_wait is too short, and smtprcv receive late packets ( what time_wait tries to avoid ) 2. time_wait was made for the early days of the internet, and is unnecessary long, affecting the server by a large number of sockets I decided to test the second hypothesis and reduce the time_wait to 30 seconds Benoit Here is the full article where my fresh knowledge comes from : Title: The TIME-WAIT state in TCP and Its Effect on Busy Servers http://www.isi.edu/touch/pubs/infocomm99/infocomm99-web/ Enjoy. Here is a post I found, that made me want to try change my settings : Zhan Philip wrote: > > I am sorry that my last message with a wrong title. > > I have two almost identical systems (Solaris 2.6 with > the same HW and the same settings) and running an > identical application (SunLink SNA gateway). The > first one has the same amount of traffic as the second > one but much more TCPs in TIME_WAIT state (1500 vs > 50). > The first one was not stable (very slow or hang) in > the past two weeks but the second one has been very > stable. > > After I changed the tcp_fin_wait_2_flush_interval > value from 675000ms to 30000ms and > tcp_keepalive_interval value from 2hrs to 60000ms, the > first one is running OK now. ----- Original Message ----- From: "John Martoccio" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, December 19, 2003 12:43 PM Subject: RE: Why so many time wait ... | Benoit, | | I want to thank you all on this thread for posting this. I set my Windows | 2000 to: | | HKLM\System\ControlSet1\Services\Tcpip\Parameters DWORD: | TCPTimedWaitDelay Decimal:60 | HKLM\System\ControlSet2\Services\Tcpip\Parameters DWORD: | TCPTimedWaitDelay Decimal:60 | HKLM\System\CurrentControlSet\Services\Tcpip\Parameters DWORD: | TCPTimedWaitDelay Decimal:60 | | The Netstat is reporting the clearing of those Time_Wait connections in a | reasonable time now. Did I understand correctly that once a connection goes | to a Time_Wait, the server connected cannot reuse the previous connection | anyway, or is my server waiting to re-establish connection on the same port, | and if it doesn't within the TCPTimedWaitDelay, the connection port is | dropped ? | | | John Martoccio | Intelligent Solutions (a computer VAR) | Fox Lake, IL, USA | [EMAIL PROTECTED] | | | > -----Original Message----- | > From: [EMAIL PROTECTED] | > [mailto:[EMAIL PROTECTED] Behalf Of BSarton | > Sent: Friday, December 19, 2003 4:48 AM | > To: [email protected] | > Subject: Re: Why so many time wait ... | > | > | > I have created a TcpTimedWaitDelay key and set it to 30, and | > MaxUserPort | > 10000 | > I dont expect a miracle from this, but anything is worth trying | > | > Benoit | > | > | > | > Read this | > | > http://msdn.microsoft.com/library/default.asp?url=/library/en- | > us/winsock/winsock/disconnectex_2.asp | > | > You can change a registry entry to set the time that the | > socket will be | > in time_wait (default 240 seconds). | > | > klint. | > | > This is the discussion list for the IMS Free email server software. | > To unsubscribe send mailto:[EMAIL PROTECTED] | > | > Delivered by Rockliffe MailSite | > http://www.rockliffe.com/mailsite | > Rock Solid Software (tm) | > | | This is the discussion list for the IMS Free email server software. | To unsubscribe send mailto:[EMAIL PROTECTED] | | Delivered by Rockliffe MailSite | http://www.rockliffe.com/mailsite | Rock Solid Software (tm) | This is the discussion list for the IMS Free email server software. To unsubscribe send mailto:[EMAIL PROTECTED] Delivered by Rockliffe MailSite http://www.rockliffe.com/mailsite Rock Solid Software (tm)
