tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: SO_LINGER
Date Wed, 09 May 2007 15:19:36 GMT
Good Morning Johannes-

enabling SO_LINGER option is a OS directive "dont close this connection when 
data is being transmitted"
Have you found other behaviour either in Microsoft or Unix OS?

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Wolter, Johannes - ENCOWAY" <>
To: <>
Sent: Wednesday, May 09, 2007 9:38 AM
Subject: SO_LINGER


at my company we developed our own servlet-engine/server and experienced
problems, when content was sent through a VPN tunnel. The problem seemed
to be, that on slow networks TCP-connections were cancelled (RST,ACK),
that means not all content written to the socket was sent to the client,
even when we triggered a graceful disconnect (LINGER.l_onoff  == 0 see
<> )

We solved the problem by setting linger:

Socket.setSoLinger(100) (Java code)

We do not understand why this is necessary, but finally saw, that tomcat
seems to do the same thing. Maybe someone can tell my, why tomcat is
setting SO_LINGER? I found a post from 2002 but it doesn't really
explain, _why_ setSoLinger(100) is necessary.

Thanks for any hint,

Johannes Wolter

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message