Hi,

 

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
http://msdn2.microsoft.com/en-us/library/ms737582.aspx
<http://msdn2.microsoft.com/en-us/library/ms737582.aspx> )

 

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. 

http://mail-archives.apache.org/mod_mbox/jakarta-alexandria-dev/200201.m
box/%3C000101c19864$2645ba60$033cc80a%40octovma%3E
<http://mail-archives.apache.org/mod_mbox/jakarta-alexandria-dev/200201.
mbox/%3C000101c19864$2645ba60$033cc80a%40octovma%3E>   

 

Thanks for any hint,

Johannes Wolter

 

 

  • SO_LINGER Wolter, Johannes - ENCOWAY

Reply via email to