----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
On Tue, 18 Jan 2000, Jon Smirl wrote:
> > SO_LINGER in mod_jserv, nor any SO_LINGER set in jserv. Does java
> > automatically set SO_LINGER for the TCP SocketImp??
>
> It is defaulted on in the tcp/ip stacks, you need to turn it off.
>
> In general most tcp/ip sessions cross routers so having it on is the correct
> default. In JServ's case we know for sure that these sessions don't cross
> routers so it should be turned off. There is no point in LINGERing for a
> packet from a router when there aren't any routers.
>
> Changing this will have no impact on the performance of JServ, it will just
> get rid of all those sokets in the WAITING state. At best it will free up
> some memory and make tcp/ip a tiny bit faster.
Erm... so what is the point of doing it? If a box can't handle any volume
of connections in TIME_WAIT, it can't handle that volume of web serving
period. It is very cheap to have lots of connections in TIME_WAIT if
implemented properly.
Just because traffic doesn't cross a router does _NOT_ need you don't need
to allow for a proper shutdown of a connection. There can even be lost
packets on the same host. Disabling it just to make your netstat output
look smaller is foolish; I can't find anything in this thread detailing
any real problem anyone is having with having a few connections around in
TIME_WAIT.
The intended purpose of SO_LINGER is _NOT_ to avoid TIME_WAIT. Setting it
to 0 does more than just avoid TIME_WAIT, it also results in the
connection being shutdown with a RST (ie. aborted) and not properly
closed. In some situations, this can lead to data not getting where it
should go. Yes, even on the local machine.
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]