I`m using Tomcat 5.0.30 / Apache 2.0.54 / JK 1.2.14.1

I looked a bit in the source of the Tomcat JK connector,
and the 'connectionTimeout' parameter of the <Connector> is
relayed to 'soTimeout' of the listening JK sockets "ChannelSocket.java".
...which takes us to the java.net.Socket api and SO_TIMEOUT parameter.

Seems to me that mod_jk in Apache keeps the connection opened,
therefore never closing it and reusing it for future calls.
If so, and if I set a connectionTimeout on the Tomcat JK connector, it would
always close the connection with a TimeoutException. That would
explain the log entries.

I don't know, I'm just guessing because my system is not in production
yet, but if I set my Tomcat connector to 'no timeout' and my Apache
worker to socket_timeout=30 secs, wouldn't the sockets be recycled on both
ends
anyway when not active for 30 secs?

My Apache workers.properties looks like:

worker.tomcat1.port=8009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.cachesize=150
worker.tomcat1.cache_timeout=600
worker.tomcat1.recycle_timeout=300
worker.tomcat1.socket_timeout=30
worker.tomcat1.socket_keepalive=1

and I haven't had the log entry in Tomcat since I set the
cache and timeouts in Apache.

Hope it helps...
Jean-Marc

> -----Original Message-----
> From: Rick [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 06, 2005 09:54
> To: 'Tomcat Users List'; [EMAIL PROTECTED]
> Subject: RE: [5.5.9] Excessive jk INFO log msgs "connection timeout
> reached"
>
>
> Jean-Marc,
>   Actually, without the "connectionTimeout" set, jk seems to
> hold on to its
> connections indefinitely and after a while, the apache to
> tomcat connection
> hangs (pages quit serving).   Could you tell me which combo
> of versions you
> use for apache, jk, and tomcat.  I'm trying to figure out what is the
> "correct" configuration.  Or if you have a link to a guide,
> I have yet to
> find a "best practices".
>
> Thanks,
> Rick
>
> -----Original Message-----
> From: Jean-Marc Marchand [mailto:[EMAIL PROTECTED]
> Posted At: Thursday, October 06, 2005 6:36 AM
> Posted To: Tomcat Dev
> Conversation: [5.5.9] Excessive jk INFO log msgs "connection timeout
> reached"
> Subject: RE: [5.5.9] Excessive jk INFO log msgs "connection
> timeout reached"
>
>
> I got rid of this message when I realized that my AJP connector's
> configuration (in server.xml) had a "connectionTimeout" set.
> Try setting it bigger or simply removing it, which will default to 'no
> timeout'.
>
> Cheers,
> Jean-Marc
>
>
>
> > -----Original Message-----
> > From: Rick [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 05, 2005 18:19
> > To: 'Tomcat Users List'
> > Subject: [5.5.9] Excessive jk INFO log msgs "connection timeout
> > reached"
> >
> >
> > Anyone know the proper way to handle these messages? I get piles of
> > them in catalina.out
> >
> > ------------
> > Oct 5, 2005 3:00:23 PM org.apache.jk.common.ChannelSocket
> > processConnection
> > INFO: connection timeout reached
> > ------------
> >
> > Tried adding the following line to the default
> > <catalina_home>/common/classes/logging.properties
> > org.apache.jk.common.ChannelSocket.level=WARN
> >
> > Has no effect.  The only thing I have been able to find is people
> > using Log4j instead of the default java.util.logging that
> came setup
> > with Tomcat 5.5.  Was wondering, is that the only way?  If so, why
> > does it work w/ Log4j and not the default java.util.logging?
> >
> > Looking at the source for
> > 'org.apache.jk.common.ChannelSocket', the line reads...
> >
> >     log.info( "connection timeout reached");
> >
> > Should it not instead read...
> >
> >     if(log.isInfoEnabled()) log.info( "connection timeout reached");
> >
> >
> > Anyway, thanks for any help to this.
> >
> > -Rick Gavin
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to