You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patty O'Reilly <or...@qualcomm.com> on 2005/04/21 02:30:32 UTC
tomcat connectors
The descriptions of recycle_timeout and socket_timeout seem very
similar in the Jakarta Tomcat Connector doc. Does anyone know when
you would use one over the other, or should both directives be
used together?
I'm using 1.2.8 for Apache 2.0.52 + RHAS3.
Many thanks
--patty
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: tomcat connectors
Posted by Patty O'Reilly <or...@qualcomm.com>.
First off, I really appreaciate your help. Many thanks.
It looks like I am using the prefork module.
$ ./httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
MaxClients is set to 150 on apache. maxThreads in the tomcat
server.xml is set to 150 as well, along with aditional threads:
<Connector acceptCount="100" connectionTimeout="20000"
disableUploadTimeout="true" port="8140" redirectPort="8443"
maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
I am going to change AJP connector and add the connectionTimeout
that you suggested like this:
<Connector port="8142" protocol="AJP/1.3"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
redirectPort="8443" connectionTimeout="20000">
^^^^^^^^^^^^^^^^^^^^^^^^
</Connector>
I'm also going to bump maxThreads to 175. Tonight we are going
to do some load testing.
Fingers crossed.
On Sat, 23 Apr 2005, Mladen Turk wrote:
> Date: Sat, 23 Apr 2005 10:21:27 +0200
> From: Mladen Turk <ml...@jboss.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: tomcat connectors
>
> Patty O'Reilly wrote:
> > Thanks very much for responding. I'm still stuggling with an ever
> > growing number of connections to the apache server and an ever growing
> > number of threads on my tomcat server. I'm fairly certain it is
> > not the application. I have all three timeouts set but no joy.
> >
> > worker.ifa-prod.jweb1.cachesize=1
> > worker.ifa-prod.jweb1.cache_timeout=600
> > worker.ifa-prod.jweb1.socket_keepalive=1
> > worker.ifa-prod.jweb1.socket_timeout=300
> > worker.ifa-prod.jweb1.recycle_timeout=300
> >
>
> You are probably using prefork mpm, so there is no way to
> control the number of connections to Tomcat in any way, trough
> mod_jk. You can limit it only by setting MaxClients in the httpd.conf
> to the maximum number desired.
> Because of pre-forking mechanism each child process will eventually
> establish a single connection to Tomcat, thus the number of connections
> will rise from StartServers to MaxClients.
>
> So there are two solutions for prefork.
> 1. Make maxThreads==MaxClients
> 2. Add connectionTimeout="20000" to AJP connector.
>
> The leter one will recycle inactive connections, but degrade
> the performance.
>
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> 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: tomcat connectors
Posted by Patty O'Reilly <or...@qualcomm.com>.
Mladen,
You are my hero! Setting connectionTimeout="20000" to the
AJP connector has resolved my accumulating threads and connections
problem.
--patty
On Sat, 23 Apr 2005, Mladen Turk wrote:
> Date: Sat, 23 Apr 2005 10:21:27 +0200
> From: Mladen Turk <ml...@jboss.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: tomcat connectors
>
> Patty O'Reilly wrote:
> > Thanks very much for responding. I'm still stuggling with an ever
> > growing number of connections to the apache server and an ever growing
> > number of threads on my tomcat server. I'm fairly certain it is
> > not the application. I have all three timeouts set but no joy.
> >
> > worker.ifa-prod.jweb1.cachesize=1
> > worker.ifa-prod.jweb1.cache_timeout=600
> > worker.ifa-prod.jweb1.socket_keepalive=1
> > worker.ifa-prod.jweb1.socket_timeout=300
> > worker.ifa-prod.jweb1.recycle_timeout=300
> >
>
> You are probably using prefork mpm, so there is no way to
> control the number of connections to Tomcat in any way, trough
> mod_jk. You can limit it only by setting MaxClients in the httpd.conf
> to the maximum number desired.
> Because of pre-forking mechanism each child process will eventually
> establish a single connection to Tomcat, thus the number of connections
> will rise from StartServers to MaxClients.
>
> So there are two solutions for prefork.
> 1. Make maxThreads==MaxClients
> 2. Add connectionTimeout="20000" to AJP connector.
>
> The leter one will recycle inactive connections, but degrade
> the performance.
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> 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: tomcat connectors
Posted by Mladen Turk <ml...@jboss.com>.
Patty O'Reilly wrote:
> Thanks very much for responding. I'm still stuggling with an ever
> growing number of connections to the apache server and an ever growing
> number of threads on my tomcat server. I'm fairly certain it is
> not the application. I have all three timeouts set but no joy.
>
> worker.ifa-prod.jweb1.cachesize=1
> worker.ifa-prod.jweb1.cache_timeout=600
> worker.ifa-prod.jweb1.socket_keepalive=1
> worker.ifa-prod.jweb1.socket_timeout=300
> worker.ifa-prod.jweb1.recycle_timeout=300
>
You are probably using prefork mpm, so there is no way to
control the number of connections to Tomcat in any way, trough
mod_jk. You can limit it only by setting MaxClients in the httpd.conf
to the maximum number desired.
Because of pre-forking mechanism each child process will eventually
establish a single connection to Tomcat, thus the number of connections
will rise from StartServers to MaxClients.
So there are two solutions for prefork.
1. Make maxThreads==MaxClients
2. Add connectionTimeout="20000" to AJP connector.
The leter one will recycle inactive connections, but degrade
the performance.
Regards,
Mladen.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: tomcat connectors
Posted by Patty O'Reilly <or...@qualcomm.com>.
Thanks very much for responding. I'm still stuggling with an ever
growing number of connections to the apache server and an ever growing
number of threads on my tomcat server. I'm fairly certain it is
not the application. I have all three timeouts set but no joy.
worker.ifa-prod.jweb1.cachesize=1
worker.ifa-prod.jweb1.cache_timeout=600
worker.ifa-prod.jweb1.socket_keepalive=1
worker.ifa-prod.jweb1.socket_timeout=300
worker.ifa-prod.jweb1.recycle_timeout=300
--patty
On Fri, 22 Apr 2005, Lionel Farbos wrote:
> Date: Fri, 22 Apr 2005 16:03:59 +0200
> From: Lionel Farbos <li...@free.fr>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Cc: oreilly@qualcomm.com
> Subject: Re: tomcat connectors
>
> Hi,
>
> As described here : http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
> the goal of socket_timeout is very different than recyle_timeout :
>
> socket_timeout is a timeout during the activity (between apache and tomcat)
> recycle_timeout is a timeout after the activity; when the exchanges between apache and tomcat are finished, the socket remains open during recycle_timeout of inactivity (this feature is close to cache_timeout).
>
> Regards.
> On Wed, 20 Apr 2005 17:30:32 -0700 (PDT)
> "Patty O'Reilly" <or...@qualcomm.com> wrote:
>
> > The descriptions of recycle_timeout and socket_timeout seem very
> > similar in the Jakarta Tomcat Connector doc. Does anyone know when
> > you would use one over the other, or should both directives be
> > used together?
> >
> > I'm using 1.2.8 for Apache 2.0.52 + RHAS3.
> >
> > Many thanks
> > --patty
> >
> > ---------------------------------------------------------------------
> > 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: tomcat connectors
Posted by Lionel Farbos <li...@free.fr>.
Hi,
As described here : http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
the goal of socket_timeout is very different than recyle_timeout :
socket_timeout is a timeout during the activity (between apache and tomcat)
recycle_timeout is a timeout after the activity; when the exchanges between apache and tomcat are finished, the socket remains open during recycle_timeout of inactivity (this feature is close to cache_timeout).
Regards.
On Wed, 20 Apr 2005 17:30:32 -0700 (PDT)
"Patty O'Reilly" <or...@qualcomm.com> wrote:
> The descriptions of recycle_timeout and socket_timeout seem very
> similar in the Jakarta Tomcat Connector doc. Does anyone know when
> you would use one over the other, or should both directives be
> used together?
>
> I'm using 1.2.8 for Apache 2.0.52 + RHAS3.
>
> Many thanks
> --patty
>
> ---------------------------------------------------------------------
> 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