Date: Mon, 19 May 1997 09:54:37 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: randy@zyzzyva.com (Randy Terbush) Cc: dev@flevel.co.uk, dg@root.com, freebsd-current@FreeBSD.ORG Subject: Re: FIN_WAIT_2 Message-ID: <199705191654.JAA24391@phaeton.artisoft.com> In-Reply-To: <199705191323.IAA09358@sierra.zyzzyva.com> from "Randy Terbush" at May 19, 97 08:23:29 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > Thanks for the information. It seems from testing on one of our machines > > that the timeout may be around 5 mins. It's unfortunate that apache seems > > to have no way to detect that the user has hit stop other than just > > leaving the conntion in FIN_WAIT_2 until the kernel times it out. > > The Apache Group has gone through considerable contortions on this > issue. The FIN_WAIT_2 is not a result of a user pressing STOP, but > rather the result of a half-close on the socket waiting for the > client to either close or restart the connection. The are a number > of reasons that this is needed. Visit the following URL for a more > thorough explanation. > > > http://www.apache.org/docs/misc/fin_wait_2.html If you are a Winsock application programmer, it is important that you explicitly call shutdown( s, x), where x is (preferrably) 2. Otherwise, WinSock does not correctly negotiate shutdown on close. Winsock being broken is the major reason for these eternally hanging connections. Comes from people like NetScape and the people who wrote the code which became MS IE not understanding Winsock fully (what with them being decent, God-fearing UNIX folks, like your good neighbors). For more details: _Windows Sockets Network Programmiong_ Bob Quinn, David Shute Addison-Wesley Publishing ISBN 0-201-63372-8 Specifically, the end of "Chapter 4: Network Application Mechanics". The "x = 2" is required because some existing WinSock implementations fail to shutdown correctly with "x = 1". Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705191654.JAA24391>