You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ian Hunter <ih...@hunterweb.net> on 2006/05/23 22:23:48 UTC
Disable KeepAlive on AJP connector?
I have an application that queries Tomcat quite frequently (more than once
a minute) for status updates. I also have a potentially high number of
clients -- more that the number of threads configured for connectors.
Also, I'm using port 8009 for an AJP connector from Apache.
OK, that's all fine, here's my problem: the clients are all requesting
keepalives, and if there are more clients than threads, that's very bad.
I need to totally disable keepalives, but I cannot figure out how to
disable keepalives for the AJP connector. There's nothing in server.xml,
and I've tried KeepAlive Off in httpd.conf s well as
Jkworker.property.appname.KeepAlive Off.
Help?!?!
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Disable KeepAlive on AJP connector?
Posted by Ian Hunter <ih...@hunterweb.net>.
On Tue, May 23, 2006 23:04, Bill Barker wrote:
> The traditional way to handle this is to set connectionTimeout="300000"
> (the
> actual value will vary depending on your system :). This will recycle the
> thread if no Apache child talks to it for 5min.
>
That got me closer. Now I don't see any connections older than what I set
the connectionTimeout value for. We'll see what happens in production, if
this helps or not.
> Usually a better solution with 5.5.x is to use the APR or NIO AJP
> Connector.
> These allows for Tomcat to maintain the Socket connection to a large
> number
> of Apache children, without committing Threads to them until it actually
> recieves a request.
That's a thought too.
Thanks!
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Disable KeepAlive on AJP connector?
Posted by Bill Barker <wb...@wilshire.com>.
The traditional way to handle this is to set connectionTimeout="300000" (the
actual value will vary depending on your system :). This will recycle the
thread if no Apache child talks to it for 5min.
Usually a better solution with 5.5.x is to use the APR or NIO AJP Connector.
These allows for Tomcat to maintain the Socket connection to a large number
of Apache children, without committing Threads to them until it actually
recieves a request.
"Ian Hunter" <ih...@hunterweb.net> wrote in message
news:3405.69.15.7.58.1148415828.squirrel@hunterweb.net...
>I have an application that queries Tomcat quite frequently (more than once
> a minute) for status updates. I also have a potentially high number of
> clients -- more that the number of threads configured for connectors.
> Also, I'm using port 8009 for an AJP connector from Apache.
>
> OK, that's all fine, here's my problem: the clients are all requesting
> keepalives, and if there are more clients than threads, that's very bad.
> I need to totally disable keepalives, but I cannot figure out how to
> disable keepalives for the AJP connector. There's nothing in server.xml,
> and I've tried KeepAlive Off in httpd.conf s well as
> Jkworker.property.appname.KeepAlive Off.
>
> Help?!?!
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Disable KeepAlive on AJP connector?
Posted by randy repasa <ra...@gmail.com>.
I must have misunderstood his question. Was he asking how to disable
keepalives for the AJP connector, or was he asking how to disable http
keep-alive?
On 5/24/06, Rainer Jung <ra...@kippdata.de> wrote:
>
> I assume you put an Apache in front of your AJP connector? Then you need
> to disable HTTP Keep-Alive in the Apache configuration. AJP 13 will
> always use persistent connections between Apache and Tomcat.
>
> The workers.properties attribute socket_keepalive has no relation to
> HTTP Keep-Alive. The option configure TCP-Keepalive, which is sometimes
> needed when Apache and Tomcat are connected via a firewall which drops
> idle connections.
>
> randy repasa wrote:
> > Hi Ian,
> >
> > The config option you're looking for is not in the server.xml file,
> there's
> > a config option in workers.properties file that's specifically for
> > keepalive: socket_keepalive
> >
> > If you want to disable keepalive for your app, you have to set this
> option
> > to zero:
> >
> > worker.<worker name>.socket_keepalive=0
> >
> > Hope this helps.
> >
> > Randy
> >
> > On 5/24/06, Ian Hunter <ih...@hunterweb.net> wrote:
> >>
> >> I have an application that queries Tomcat quite frequently (more than
> >> once
> >> a minute) for status updates. I also have a potentially high number of
> >> clients -- more that the number of threads configured for connectors.
> >> Also, I'm using port 8009 for an AJP connector from Apache.
> >>
> >> OK, that's all fine, here's my problem: the clients are all requesting
> >> keepalives, and if there are more clients than threads, that's very
> bad.
> >> I need to totally disable keepalives, but I cannot figure out how to
> >> disable keepalives for the AJP connector. There's nothing in
> server.xml,
> >> and I've tried KeepAlive Off in httpd.conf s well as
> >> Jkworker.property.appname.KeepAlive Off.
> >>
> >> Help?!?!
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Disable KeepAlive on AJP connector?
Posted by Rainer Jung <ra...@kippdata.de>.
I assume you put an Apache in front of your AJP connector? Then you need
to disable HTTP Keep-Alive in the Apache configuration. AJP 13 will
always use persistent connections between Apache and Tomcat.
The workers.properties attribute socket_keepalive has no relation to
HTTP Keep-Alive. The option configure TCP-Keepalive, which is sometimes
needed when Apache and Tomcat are connected via a firewall which drops
idle connections.
randy repasa wrote:
> Hi Ian,
>
> The config option you're looking for is not in the server.xml file, there's
> a config option in workers.properties file that's specifically for
> keepalive: socket_keepalive
>
> If you want to disable keepalive for your app, you have to set this option
> to zero:
>
> worker.<worker name>.socket_keepalive=0
>
> Hope this helps.
>
> Randy
>
> On 5/24/06, Ian Hunter <ih...@hunterweb.net> wrote:
>>
>> I have an application that queries Tomcat quite frequently (more than
>> once
>> a minute) for status updates. I also have a potentially high number of
>> clients -- more that the number of threads configured for connectors.
>> Also, I'm using port 8009 for an AJP connector from Apache.
>>
>> OK, that's all fine, here's my problem: the clients are all requesting
>> keepalives, and if there are more clients than threads, that's very bad.
>> I need to totally disable keepalives, but I cannot figure out how to
>> disable keepalives for the AJP connector. There's nothing in server.xml,
>> and I've tried KeepAlive Off in httpd.conf s well as
>> Jkworker.property.appname.KeepAlive Off.
>>
>> Help?!?!
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Disable KeepAlive on AJP connector?
Posted by randy repasa <ra...@gmail.com>.
Hi Ian,
The config option you're looking for is not in the server.xml file, there's
a config option in workers.properties file that's specifically for
keepalive: socket_keepalive
If you want to disable keepalive for your app, you have to set this option
to zero:
worker.<worker name>.socket_keepalive=0
Hope this helps.
Randy
On 5/24/06, Ian Hunter <ih...@hunterweb.net> wrote:
>
> I have an application that queries Tomcat quite frequently (more than once
> a minute) for status updates. I also have a potentially high number of
> clients -- more that the number of threads configured for connectors.
> Also, I'm using port 8009 for an AJP connector from Apache.
>
> OK, that's all fine, here's my problem: the clients are all requesting
> keepalives, and if there are more clients than threads, that's very bad.
> I need to totally disable keepalives, but I cannot figure out how to
> disable keepalives for the AJP connector. There's nothing in server.xml,
> and I've tried KeepAlive Off in httpd.conf s well as
> Jkworker.property.appname.KeepAlive Off.
>
> Help?!?!
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>