You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Filip Hanik <fi...@filip.net> on 2003/04/03 04:46:23 UTC

Session Replication/Clustering 4.1.x JDK NIO Bug fixes

hey ya'all,

Running today on Solaris I discovered a bug in the way java.nio is
implemented on Solaris 8(Intel) JDK 1.4.1. This problem could exist in other
JDK versions as well.

The problem is that when a thread reading from a socket channel calls
selector.wakeup(); the selector doesn't wakeup from its sleeping state.
Hence the replication works exactly once only.

I have added in a sleep timeout for the selector (in server.xml the property
tcpSelectorTimeout has been added).

Play around with this timeout, setting it to small means CPU times goes to
waking up the thread. Setting it to high means you can get some delay in
your replication. I have defaulted it to 100ms.

The new version including updated documentation can be found at
http://www.filip.net/tomcat-clustering.html.

The same fix has been applied to the Tomcat 5 CVS branch

Best regards.
Filip


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Session Replication/Clustering 4.1.x JDK NIO Bug fixes

Posted by Filip Hanik <ma...@filip.net>.
yes, tomcat 5 will be shipping with clustering :)

> -----Original Message-----
> From: Kwok Peng Tuck [mailto:pengtuck@makmal.net]
> Sent: Thursday, April 03, 2003 1:25 AM
> To: Tomcat Users List
> Subject: Re: Session Replication/Clustering 4.1.x JDK NIO Bug fixes
> 
> 
> Just curious Filip, but is any of this going to make it's way into a 
> future version of  Tomcat as a standard feature (the clustering and
> session replication, not the bugs.)  ?
> 
> Filip Hanik wrote:
> 
> >hey ya'all,
> >
> >Running today on Solaris I discovered a bug in the way java.nio is
> >implemented on Solaris 8(Intel) JDK 1.4.1. This problem could 
> exist in other
> >JDK versions as well.
> >
> >The problem is that when a thread reading from a socket channel calls
> >selector.wakeup(); the selector doesn't wakeup from its sleeping state.
> >Hence the replication works exactly once only.
> >
> >I have added in a sleep timeout for the selector (in server.xml 
> the property
> >tcpSelectorTimeout has been added).
> >
> >Play around with this timeout, setting it to small means CPU 
> times goes to
> >waking up the thread. Setting it to high means you can get some delay in
> >your replication. I have defaulted it to 100ms.
> >
> >The new version including updated documentation can be found at
> >http://www.filip.net/tomcat-clustering.html.
> >
> >The same fix has been applied to the Tomcat 5 CVS branch
> >
> >Best regards.
> >Filip
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Session Replication/Clustering 4.1.x JDK NIO Bug fixes

Posted by Kwok Peng Tuck <pe...@makmal.net>.
Just curious Filip, but is any of this going to make it's way into a 
future version of  Tomcat as a standard feature (the clustering and
session replication, not the bugs.)  ?

Filip Hanik wrote:

>hey ya'all,
>
>Running today on Solaris I discovered a bug in the way java.nio is
>implemented on Solaris 8(Intel) JDK 1.4.1. This problem could exist in other
>JDK versions as well.
>
>The problem is that when a thread reading from a socket channel calls
>selector.wakeup(); the selector doesn't wakeup from its sleeping state.
>Hence the replication works exactly once only.
>
>I have added in a sleep timeout for the selector (in server.xml the property
>tcpSelectorTimeout has been added).
>
>Play around with this timeout, setting it to small means CPU times goes to
>waking up the thread. Setting it to high means you can get some delay in
>your replication. I have defaulted it to 100ms.
>
>The new version including updated documentation can be found at
>http://www.filip.net/tomcat-clustering.html.
>
>The same fix has been applied to the Tomcat 5 CVS branch
>
>Best regards.
>Filip
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org