You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Jones, Keven" <Ke...@ncr.com> on 2009/06/10 17:11:11 UTC
Tomcat maxThreads Issue
Hello,
I have Tomcat (can't figure out what version as the version.sh script is giving all kinds of errors) running on separate Linux servers. So an overview of my config is
1 web server, 4 app servers (tomcat), and 1 db server.
We were seeing an increase in the httpd processes on the web server to the point where I had to increase the MaxClients on the apache 2 server to 2048. I finally figured out that the normal number of httpd daemons on the web server (50-100) was spiking due to tomcat processes stalling or going completely down.
So I started looking at why tomcat was failing and I found this error message in the ACStarError.log :
SEVERE: All threads (200) are currently busy, waiting. Increase maxThreads (200) or check the servlet status.
So I checked the server.xml file and found the following:
<Connector port="81" protocol="HTTP/1.1"
server="-"
maxThreads="600" connectionTimeout="20000"
redirectPort="443" />
<!-- Awele 20070402 For SSL Requests, processed non-SSL,
due to Coyote SSL Accelerator -->
<!--
<Connector port="443" address="10.5.3.9" protocol="HTTP/1.1"
server="-"
secure="true"
maxThreads="600" connectionTimeout="20000"
/>
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
So It looks like the maxThreads has already been increased to 600. The server has been rebooted and tomcat stopped/started multiple times. Again all servers are Red Hat 5.2. Is there an additional parameter that needs to be set in order for tomcat to actually increase the maxThreads ?
Thank You
Keven Jones
Re: Tomcat maxThreads Issue
Posted by Chetan Chheda <ch...@yahoo.com>.
What does your Apache access_log say at the time when tomcat threads are exhausted ?
I had a very similar issue in my environment. The culprit turned out to be JkMount options. Apache was sending all requests, whether it is for static or dynamic content to tomcat. At the same time my tomcats locked up, I was seeing a lot of requests for static content(gifs in my case) in the apache access_log
Setting up mod_jk to only send *.jsp to tomcats fixed the issue for me.
________________________________
From: "Jones, Keven" <Ke...@ncr.com>
To: "users@tomcat.apache.org" <us...@tomcat.apache.org>
Sent: Wednesday, June 10, 2009 11:11:11 AM
Subject: Tomcat maxThreads Issue
Hello,
I have Tomcat (can't figure out what version as the version.sh script is giving all kinds of errors) running on separate Linux servers. So an overview of my config is
1 web server, 4 app servers (tomcat), and 1 db server.
We were seeing an increase in the httpd processes on the web server to the point where I had to increase the MaxClients on the apache 2 server to 2048. I finally figured out that the normal number of httpd daemons on the web server (50-100) was spiking due to tomcat processes stalling or going completely down.
So I started looking at why tomcat was failing and I found this error message in the ACStarError.log :
SEVERE: All threads (200) are currently busy, waiting. Increase maxThreads (200) or check the servlet status.
So I checked the server.xml file and found the following:
<Connector port="81" protocol="HTTP/1.1"
server="-"
maxThreads="600" connectionTimeout="20000"
redirectPort="443" />
<!-- Awele 20070402 For SSL Requests, processed non-SSL,
due to Coyote SSL Accelerator -->
<!--
<Connector port="443" address="10.5.3.9" protocol="HTTP/1.1"
server="-"
secure="true"
maxThreads="600" connectionTimeout="20000"
/>
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
So It looks like the maxThreads has already been increased to 600. The server has been rebooted and tomcat stopped/started multiple times. Again all servers are Red Hat 5.2. Is there an additional parameter that needs to be set in order for tomcat to actually increase the maxThreads ?
Thank You
Keven Jones
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
I did a grep for heap in catalina.out but do not see any out of memory entries.
How do I check the default JVM memory setting and how do I adjust it?
Thx
-----Original Message-----
From: Jonathan Mast [mailto:jhmast.developer@gmail.com]
Sent: Wednesday, June 10, 2009 1:04 PM
To: Tomcat Users List
Subject: Re: Tomcat maxThreads Issue
I encountered a similar issue of numerous Httpd processes spawning b/c of Tomcat. The issue for me was that Tomcat was running out of memory, and Httpd for some reason thought spawning a bunch a threads would help ;)
Do you know how much memory these instances of Tomcat are using? The default JVM memory is ridiculously low and requires the adjustment to higher maximum value for production servers.
Grep "heap" catalina.out to see if tomcat is indeed running out of memory.
On Wed, Jun 10, 2009 at 12:44 PM, Peter Crowther < Peter.Crowther@melandra.com> wrote:
> OK, so that's a JRockit JVM, not a Sun JVM. Remind me not to point
> you at any more Sun documentation!
>
> As a rough look at that, there are a few threads in the HTTP connector
> thread pool, a bunch of threads reading data from JK connections, and
> one or two in your app code. I've never looked at the innards of JK,
> so will have to leave that to one of the JK experts to interpret.
>
> - Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Jonathan Mast <jh...@gmail.com>.
I encountered a similar issue of numerous Httpd processes spawning b/c of
Tomcat. The issue for me was that Tomcat was running out of memory, and
Httpd for some reason thought spawning a bunch a threads would help ;)
Do you know how much memory these instances of Tomcat are using? The
default JVM memory is ridiculously low and requires the adjustment to higher
maximum value for production servers.
Grep "heap" catalina.out to see if tomcat is indeed running out of memory.
On Wed, Jun 10, 2009 at 12:44 PM, Peter Crowther <
Peter.Crowther@melandra.com> wrote:
> OK, so that's a JRockit JVM, not a Sun JVM. Remind me not to point you at
> any more Sun documentation!
>
> As a rough look at that, there are a few threads in the HTTP connector
> thread pool, a bunch of threads reading data from JK connections, and one or
> two in your app code. I've never looked at the innards of JK, so will have
> to leave that to one of the JK experts to interpret.
>
> - Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jonathan Mast [mailto:jhmast.developer@gmail.com]
> Subject: Re: Tomcat maxThreads Issue
>
> Add the following somewhere near the top (I place mine after all the
> explanatory comments):
> JAVA_OPTS=" -Xmx1024m"
Again, if there's no evidence of a heap issue (and none has been presented) *do not* change the heap settings - at best that can only muddy the water. If you want to look at garbage collection activity, use -verbose:gc (which should work even on JRockit) to get information about how often a GC occurs. Unless it's happening very frequently, leave the heap settings alone.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Jonathan Mast <jh...@gmail.com>.
Well I'm not sure how to check the current memory settings but I sure know
how to adjust them :)
Presuming that you downloaded Tomcat directly and installed manually:
open "$TOMCAT/bin/catalina.sh"
Add the following somewhere near the top (I place mine after all the
explanatory comments):
JAVA_OPTS=" -Xmx1024m"
This is tells java to allow a maximum of 1024 megabytes of memory to this
instance of tomcat. Adjust appropriately.
Please note:
* the leading SPACE before the "-Xmx".
* this is not a labeled parameter, therefore no "=" btwn the option and
value.
On Wed, Jun 10, 2009 at 1:12 PM, Jones, Keven <Ke...@ncr.com> wrote:
> Thank you Tim
>
> I am going to attempt to set the maxThreads on 8011 to 600 and hope it
> helps.
>
> The config is 1 linux apache2 server with 4 linux tomcat servers and each
> tomcat server has 4 sepearte tomcat instances. So we have a total of 16
> tomcat instances across 4 servers.
>
> Yes, there is a firewall between the web sever and the
> app(tomcat)/db(mysql) server.
>
> KJ
>
> -----Original Message-----
> From: Tim Funk [mailto:funkman@apache.org]
> Sent: Wednesday, June 10, 2009 1:02 PM
> To: Tomcat Users List
> Subject: Re: Tomcat maxThreads Issue
>
> Looking at the history of the thread - here are some guesses ....
>
> You have a connector on port 81 (http) and a connector on 8011 (ajp) and
> commented out connector for 443.
>
> The port 81 connector and commented out connector are set to 600 - which
> means absolutely nothing if apache is talking to tomcat via jk.
>
> Set |maxThreads on the connector for using port 8011 and life should be
> better.
>
> If there are mulitple apache servers in front of tomcat - you need to
> ensure you have (#apaches * max number connections per apache) threads
> available on each tomcat. The thread history seems to indicate you only have
> one apache with 100 workers max. So raising the maxThreads in tomcat from
> 200 to something higher is not needed.
>
> Is there a firewall between apache and tomcat? If so - it could mean that
> your firewall is timing out the connection and then bad things happen.
> |
> http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>
>
> -Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Tomcat maxThreads Issue
Posted by Rainer Jung <ra...@kippdata.de>.
On 10.06.2009 18:26, Jones, Keven wrote:
> FYI, I'm just the linux admin as the "applicatons" group/developer
> and coder is not making any headway into resolving this. This is a
> mobility application (ie. Mobile banking, so you go to your iphone
> and go to your bank.mobi..)not that it matter but....
>
> Ok, So yesterday I did perform a kill -3 and got a THREAD DUMP in the
> catalina.out file. I have copied most of it below:
The dump during times where everything is fine doesn't reveal much. You
(unfortunately) need to do this, when the problem occurs. If you manage
to catch such an event, do 3 thread dumps, each a few seconds apart from
the next. That way one can also decide, whether a situation is static or
only short term.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by Peter Crowther <Pe...@melandra.com>.
OK, so that's a JRockit JVM, not a Sun JVM. Remind me not to point you at any more Sun documentation!
As a rough look at that, there are a few threads in the HTTP connector thread pool, a bunch of threads reading data from JK connections, and one or two in your app code. I've never looked at the innards of JK, so will have to leave that to one of the JK experts to interpret.
- Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Rainer Jung <ra...@kippdata.de>.
On 10.06.2009 21:25, Caldarale, Charles R wrote:
>> From: Jones, Keven [mailto:Keven.Jones@ncr.com] Subject: RE: Tomcat
>> maxThreads Issue
>>
>> <Connector port="8011" enableLookups="false" protocol="AJP/1.3"
>> redirectPort="8443" maxThreads="400" connectionTimeout="20000"/>
>
> The syntax is ok, but I'd have to look at the code to see if
> connectionTimeout applies to anything other than the first request
> coming through. (AJP connections are intended to be persistent.)
Haven't read through all of the thread yet, but yes, connectionTimeout
on the AJP connector also closes the connection if the time between two
requests on an existing connections is longer than connectionTimeout.
20000 (20 seconds) is relatively short though. Setting it to something
like 300000 should be short enough.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
>
> He is stating that If I put an address (the same address
> Of the linux server that the tomcat instance is running on)
> that that message will go away and the maxThreads will
> actually move to 600.
>
> Anyone agree?
Nope - your vendor is sadly mistaken or confused (or you misinterpreted what he said). The address (not server) attribute in a <Connector> will limit the listen to just that IP address, whereas not including an address attribute results in listening on all IP addresses configured for the TCP/IP stack, including 10.10.10.10. The maxThreads attribute applies either way.
Your vendor is also confused, because that's not the <Connector> typically used between Tomcat and httpd; it's normally the AJP one, if you're using mod_jk or mod_proxy_ajp.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
Update,
I finally got my vendor on the line. He is telling me that this entry in my server.xml:
<connector port="81" protocol="HTTP/1.1"
Server"-"
maxThreads="600" connectionTimeout="20000"
redirectpPort="443" />
Is the reason I'm seeing this in my catalina.out. He is stating that If I put an address (the same address
Of the linux server that the tomcat instance is running on) that that message will go away and the maxThreads will actually move to 600.
So it should look like where 10.10.10.10 is the internal IP of the tomcat app server
<connector port="81" protocol="HTTP/1.1"
Server"10.10.10.10"
maxThreads="600" connectionTimeout="20000"
redirectpPort="443" />
Anyone agree?
-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Wednesday, June 10, 2009 3:25 PM
To: Tomcat Users List
Subject: RE: Tomcat maxThreads Issue
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
>
> <Connector port="8011"
> enableLookups="false" protocol="AJP/1.3" redirectPort="8443"
> maxThreads="400" connectionTimeout="20000"/>
The syntax is ok, but I'd have to look at the code to see if connectionTimeout applies to anything other than the first request coming through. (AJP connections are intended to be persistent.)
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Bill Barker <wb...@wilshire.com>.
"Caldarale, Charles R" <Ch...@unisys.com> wrote in message
news:0AAE5AB84B013E45A7B61CB66943C17228FC43856A@USEA-EXCH7.na.uis.unisys.com...
>> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
>> Subject: RE: Tomcat maxThreads Issue
>>
>> <Connector port="8011"
>> enableLookups="false" protocol="AJP/1.3" redirectPort="8443"
>> maxThreads="400" connectionTimeout="20000"/>
>
>The syntax is ok, but I'd have to look at the code to see if
>connectionTimeout applies to anything other than the first >request coming
>through. (AJP connections are intended to be persistent.)
>
No, connectionTimeout applies to all requests. Any time that the Connector
thread doesn't hear from httpd within 20 seconds (with this configuration)
it will hang up and return to the pool. Note: this value also applies to
reads from the request body. But I think almost all connections can send
the default 8Kb in 20 seconds.
The value for connectionTimeout looks low except for high-traffic sites
(would go for something more like 5 minutes for a moderate traffic site).
That would allow traffic spikes to die out without forcing unnecessary
reconnections. You may also want to configure cping/cpong on the Apache
side to aid mod_jk to detect that the connection has timed out.
> - Chuck
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
>
> <Connector port="8011"
> enableLookups="false" protocol="AJP/1.3" redirectPort="8443"
> maxThreads="400" connectionTimeout="20000"/>
The syntax is ok, but I'd have to look at the code to see if connectionTimeout applies to anything other than the first request coming through. (AJP connections are intended to be persistent.)
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
Does the syntax of this look correct to everyone?
I have added maxThreads="400" and connectionTimeout="20000"(not sure if I need the connectionTimeout)
<Connector port="8011"
enableLookups="false" protocol="AJP/1.3" redirectPort="8443"
maxThreads="400" connectionTimeout="20000"/>
Thanks everyone
-----Original Message-----
From: Tim Funk [mailto:funkman@apache.org]
Sent: Wednesday, June 10, 2009 1:02 PM
To: Tomcat Users List
Subject: Re: Tomcat maxThreads Issue
Looking at the history of the thread - here are some guesses ....
You have a connector on port 81 (http) and a connector on 8011 (ajp) and commented out connector for 443.
The port 81 connector and commented out connector are set to 600 - which means absolutely nothing if apache is talking to tomcat via jk.
Set |maxThreads on the connector for using port 8011 and life should be better.
If there are mulitple apache servers in front of tomcat - you need to ensure you have (#apaches * max number connections per apache) threads available on each tomcat. The thread history seems to indicate you only have one apache with 100 workers max. So raising the maxThreads in tomcat from 200 to something higher is not needed.
Is there a firewall between apache and tomcat? If so - it could mean that your firewall is timing out the connection and then bad things happen.
|
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
-Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
Cool,
Also, I'm examining my tomcat server.xml conf file for each instnace on each server. I am finding that
Tomcat1 AJP connector is 8011, Tomcat2 AJP 8012, Tomcat3 AJP 8013, and Tomcat4 AJP 8014. So I will try and
Add a maxThreads 600 on each of these.
Thanks
-----Original Message-----
From: Tim Funk [mailto:funkman@apache.org]
Sent: Wednesday, June 10, 2009 1:33 PM
To: Tomcat Users List
Subject: Re: Tomcat maxThreads Issue
If your not scared of the performance penalty (which these days isn't scary unless you really have high load) - try adding this to your apache config - it will end the connection between apache and tomcat after each request. This virtually eliminates the chance of a firewall dropping connections for you.
JkOptions +DisableReuse
YOu prob dont want this permanantly but its a good test
http://tomcat.apache.org/connectors-doc/reference/apache.html
-Tim
Jones, Keven wrote:
> Thank you Tim
>
> I am going to attempt to set the maxThreads on 8011 to 600 and hope it helps.
>
> The config is 1 linux apache2 server with 4 linux tomcat servers and each tomcat server has 4 sepearte tomcat instances. So we have a total of 16 tomcat instances across 4 servers.
>
> Yes, there is a firewall between the web sever and the app(tomcat)/db(mysql) server.
>
> KJ
>
> -----Original Message-----
> From: Tim Funk [mailto:funkman@apache.org]
> Sent: Wednesday, June 10, 2009 1:02 PM
> To: Tomcat Users List
> Subject: Re: Tomcat maxThreads Issue
>
> Looking at the history of the thread - here are some guesses ....
>
> You have a connector on port 81 (http) and a connector on 8011 (ajp) and commented out connector for 443.
>
> The port 81 connector and commented out connector are set to 600 - which means absolutely nothing if apache is talking to tomcat via jk.
>
> Set |maxThreads on the connector for using port 8011 and life should be better.
>
> If there are mulitple apache servers in front of tomcat - you need to ensure you have (#apaches * max number connections per apache) threads available on each tomcat. The thread history seems to indicate you only have one apache with 100 workers max. So raising the maxThreads in tomcat from 200 to something higher is not needed.
>
> Is there a firewall between apache and tomcat? If so - it could mean that your firewall is timing out the connection and then bad things happen.
> |
> http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>
>
> -Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Tim Funk <fu...@apache.org>.
If your not scared of the performance penalty (which these days isn't
scary unless you really have high load) - try adding this to your apache
config - it will end the connection between apache and tomcat after each
request. This virtually eliminates the chance of a firewall dropping
connections for you.
JkOptions +DisableReuse
YOu prob dont want this permanantly but its a good test
http://tomcat.apache.org/connectors-doc/reference/apache.html
-Tim
Jones, Keven wrote:
> Thank you Tim
>
> I am going to attempt to set the maxThreads on 8011 to 600 and hope it helps.
>
> The config is 1 linux apache2 server with 4 linux tomcat servers and each tomcat server has 4 sepearte tomcat instances. So we have a total of 16 tomcat instances across 4 servers.
>
> Yes, there is a firewall between the web sever and the app(tomcat)/db(mysql) server.
>
> KJ
>
> -----Original Message-----
> From: Tim Funk [mailto:funkman@apache.org]
> Sent: Wednesday, June 10, 2009 1:02 PM
> To: Tomcat Users List
> Subject: Re: Tomcat maxThreads Issue
>
> Looking at the history of the thread - here are some guesses ....
>
> You have a connector on port 81 (http) and a connector on 8011 (ajp) and commented out connector for 443.
>
> The port 81 connector and commented out connector are set to 600 - which means absolutely nothing if apache is talking to tomcat via jk.
>
> Set |maxThreads on the connector for using port 8011 and life should be better.
>
> If there are mulitple apache servers in front of tomcat - you need to ensure you have (#apaches * max number connections per apache) threads available on each tomcat. The thread history seems to indicate you only have one apache with 100 workers max. So raising the maxThreads in tomcat from 200 to something higher is not needed.
>
> Is there a firewall between apache and tomcat? If so - it could mean that your firewall is timing out the connection and then bad things happen.
> |
> http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
>
>
> -Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
>
> I am going to attempt to set the maxThreads on 8011
> to 600 and hope it helps.
It will likely only postpone the problem.
> Yes, there is a firewall between the web sever and the
> app(tomcat)/db(mysql) server.
The question was whether or not there's a firewall between httpd and Tomcat, not Tomcat and the DB server. If there is a firewall between httpd and Tomcat, it could be silently dropping the AJP connections, leaving Tomcat threads stranded on unusable ports.
There has been much discussion about this of late on this mailing list; I'll try to find some pointers for you.
Unless you're seeing OutOfMemoryErrors in your Tomcat logs, the heap sizing is very likely a red herring.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
> I see we have Engine set to Standalone,
> And I see the Service is catalina (?)
I would leave the name as Catalina (it's case sensitive), since that's what everyone expects (unless you have multiple <Service> elements - a very rare need).
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Caldarale, Charles R
> Subject: RE: Tomcat maxThreads Issue
>
> There has been much discussion about this of late on this mailing list;
> I'll try to find some pointers for you.
This is a useful reference:
http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html#Firewall%20Connection%20Dropping
The best (and unfortunately, biggest) discussion of this issue is here:
http://marc.info/?t=124225021500001&r=1&w=2
The most useful messages in this 61-posting thread are Rainer's, should you want to browse through them.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
Thank you Tim
I am going to attempt to set the maxThreads on 8011 to 600 and hope it helps.
The config is 1 linux apache2 server with 4 linux tomcat servers and each tomcat server has 4 sepearte tomcat instances. So we have a total of 16 tomcat instances across 4 servers.
Yes, there is a firewall between the web sever and the app(tomcat)/db(mysql) server.
KJ
-----Original Message-----
From: Tim Funk [mailto:funkman@apache.org]
Sent: Wednesday, June 10, 2009 1:02 PM
To: Tomcat Users List
Subject: Re: Tomcat maxThreads Issue
Looking at the history of the thread - here are some guesses ....
You have a connector on port 81 (http) and a connector on 8011 (ajp) and commented out connector for 443.
The port 81 connector and commented out connector are set to 600 - which means absolutely nothing if apache is talking to tomcat via jk.
Set |maxThreads on the connector for using port 8011 and life should be better.
If there are mulitple apache servers in front of tomcat - you need to ensure you have (#apaches * max number connections per apache) threads available on each tomcat. The thread history seems to indicate you only have one apache with 100 workers max. So raising the maxThreads in tomcat from 200 to something higher is not needed.
Is there a firewall between apache and tomcat? If so - it could mean that your firewall is timing out the connection and then bad things happen.
|
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
-Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Tim Funk <fu...@apache.org>.
Looking at the history of the thread - here are some guesses ....
You have a connector on port 81 (http) and a connector on 8011 (ajp) and
commented out connector for 443.
The port 81 connector and commented out connector are set to 600 - which
means absolutely nothing if apache is talking to tomcat via jk.
Set |maxThreads on the connector for using port 8011 and life should be
better.
If there are mulitple apache servers in front of tomcat - you need to
ensure you have (#apaches * max number connections per apache) threads
available on each tomcat. The thread history seems to indicate you only
have one apache with 100 workers max. So raising the maxThreads in
tomcat from 200 to something higher is not needed.
Is there a firewall between apache and tomcat? If so - it could mean
that your firewall is timing out the connection and then bad things happen.
|
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html
-Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
FYI, I'm just the linux admin as the "applicatons" group/developer and coder is not making any headway into resolving this. This is a mobility application (ie. Mobile banking, so you go to your iphone and go to your bank.mobi..)not that it matter but....
Ok, So yesterday I did perform a kill -3 and got a THREAD DUMP in the catalina.out file. I have copied most of it below:
===== FULL THREAD DUMP ===============
Tue Jun 9 15:32:27 2009
BEA JRockit(R) R27.1.0-109-73164-1.5.0_08-20061129-1415-linux-x86_64
"Main Thread" id=1 idx=0x2 tid=10410 prio=5 alive, in native
"(Signal Handler)" id=2 idx=0x4 tid=10412 prio=5 alive, in native, daemon
"(Code Generation Thread 1)" id=3 idx=0x6 tid=10413 prio=5 alive, in native, native_waiting, daemon
"(Code Optimization Thread 1)" id=4 idx=0x8 tid=10414 prio=5 alive, in native, native_waiting, daem
on
"(GC Main Thread)" id=5 idx=0xa tid=10415 prio=5 alive, in native, daemon
"(GC Worker Thread 1)" id=? idx=0xc tid=10416 prio=5 terminated, daemon
"(GC Worker Thread 2)" id=? idx=0xe tid=10417 prio=5 terminated, daemon
"(GC Worker Thread 3)" id=? idx=0x10 tid=10418 prio=5 terminated, daemon
"(GC Worker Thread 4)" id=? idx=0x12 tid=10419 prio=5 terminated, daemon
"(GC Worker Thread 5)" id=? idx=0x14 tid=10420 prio=5 terminated, daemon
"(GC Worker Thread 6)" id=? idx=0x16 tid=10421 prio=5 terminated, daemon
"(GC Worker Thread 7)" id=? idx=0x18 tid=10422 prio=5 terminated, daemon
"(GC Worker Thread 8)" id=? idx=0x1a tid=10423 prio=5 terminated, daemon
"(VM Periodic Task)" id=6 idx=0x1c tid=10424 prio=10 alive, in native, daemon
"Finalizer" id=7 idx=0x1e tid=10425 prio=8 alive, in native, native_waiting, daemon
at jrockit/memory/Finalizer.getPendingFinalizee(Z)Ljava/lang/Object;(Native Method)
at jrockit/memory/Finalizer.access$100(Z)Ljava/lang/Object;(Unknown Source)[optimized]
at jrockit/memory/Finalizer$4.run()V(Unknown Source)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"Reference Handler" id=8 idx=0x20 tid=10426 prio=10 alive, in native, native_waiting, daemon
at java/lang/ref/Reference.getPending()Ljava/lang/ref/Reference;(Native Method)
at java/lang/ref/Reference.access$000()Ljava/lang/ref/Reference;(Unknown Source)
at java/lang/ref/Reference$ReferenceHandler.run()V(Unknown Source)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"(Sensor Event Thread)" id=9 idx=0x22 tid=10427 prio=5 alive, in native, daemon
"Thread-1" id=12 idx=0x24 tid=10436 prio=1 alive, in native, sleeping, native_waiting
at java/lang/Thread.sleep(J)V(Native Method)
at com/mshift/d/j.run()V(Unknown Source)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"ContainerBackgroundProcessor[StandardEngine[Standalone]]" id=13 idx=0x26 tid=10437 prio=5 alive, i
n native, sleeping, native_waiting, daemon
at java/lang/Thread.sleep(J)V(Native Method)
at org/apache/catalina/core/ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1
549)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"http-81-Acceptor-0" id=14 idx=0x28 tid=10439 prio=5 alive, in native, daemon
at java/net/PlainSocketImpl.socketAccept(Ljava/net/SocketImpl;)V(Native Method)
at java/net/PlainSocketImpl.accept(PlainSocketImpl.java:384)
^-- Holding lock: java/net/SocksSocketImpl@0x13141ec0[thin lock]
at java/net/ServerSocket.implAccept(ServerSocket.java:450)
at java/net/ServerSocket.accept(ServerSocket.java:421)
at org/apache/tomcat/util/net/DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactor
y.java:61)
at org/apache/tomcat/util/net/JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=105163 idx=0x2a tid=18944 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/net/JIoEndpoint$Worker@0x27a6a568[fat lo
ck]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at java/lang/Object.wait()V(Native Method)[optimized]
at org/apache/tomcat/util/net/JIoEndpoint$Worker.await(JIoEndpoint.java:414)
^-- Lock released while waiting: org/apache/tomcat/util/net/JIoEndpoint$Worker@0x27a6a568[fat l
ock]
at org/apache/tomcat/util/net/JIoEndpoint$Worker.run(JIoEndpoint.java:440)
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=16 idx=0x2c tid=10441 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)[inline
d]
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)[inlined]
at java/net/SocketInputStream.read(SocketInputStream.java:129)[optimized]
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)[optimized]
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)[optimized]
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)[optimized]
^-- Holding lock: java/io/BufferedInputStream@0x296b4100[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=105166 idx=0x2e tid=18947 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x283
060e8[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at jrockit/vm/Locks.wait(Ljava/lang/Object;)V(Unknown Source)[inlined]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)[optimized
]
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x28
3060e8[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"TP-Processor4" id=18 idx=0x30 tid=10443 prio=5 alive, in native, daemon
at java/net/PlainSocketImpl.socketAccept(Ljava/net/SocketImpl;)V(Native Method)
at java/net/PlainSocketImpl.accept(PlainSocketImpl.java:384)
^-- Holding lock: java/net/SocksSocketImpl@0x1247c760[thin lock]
at java/net/ServerSocket.implAccept(ServerSocket.java:450)
at java/net/ServerSocket.accept(ServerSocket.java:421)
at org/apache/jk/common/ChannelSocket.accept(ChannelSocket.java:306)[optimized]
at org/apache/jk/common/ChannelSocket.acceptConnections(ChannelSocket.java:660)
at org/apache/jk/common/ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"TP-Monitor" id=19 idx=0x32 tid=10444 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$MonitorRunnable@0x128
1cc08[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at java/lang/Object.wait(J)V(Native Method)
at org/apache/tomcat/util/threads/ThreadPool$MonitorRunnable.run(ThreadPool.java:561)
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$MonitorRunnable@0x12
81cc08[fat lock]
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=34 idx=0x34 tid=10647 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)
at java/net/SocketInputStream.read(SocketInputStream.java:129)
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)
^-- Holding lock: java/io/BufferedInputStream@0x1b663408[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=22 idx=0x36 tid=10614 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)
at java/net/SocketInputStream.read(SocketInputStream.java:129)
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)
^-- Holding lock: java/io/BufferedInputStream@0x17090670[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[optimized]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=105168 idx=0x38 tid=18949 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x283
05ec0[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at jrockit/vm/Locks.wait(Ljava/lang/Object;)V(Unknown Source)[inlined]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)[optimized
]
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x28
305ec0[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: TS=Sun Jun 07 09:56:49 EDT 2009; RI=32.133.22.225; URI=/c2ht; QS=appno=qa2&msestks=chase
.xml&msdxid=O11IB820594039643486758861&qxq=1244383000473&stk=acct_hist_1&show=all&type=deposit&ai=6
4886262; UA=Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1
(KHTML, like Gecko) Mobile/5H11" id=24 idx=0x3a tid=10616 prio=5 alive, daemon
at java/lang/Character.toLowerCase(Character.java:4204)[optimized]
at java/lang/String.toLowerCase(String.java:2254)[optimized]
at java/lang/String.toLowerCase(String.java:2296)[inlined]
at com/mshift/engine/a.bf(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.a(ZLorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.bk(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.a(ZLorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.bk(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.Q()V(Unknown Source)[optimized]
at com/mshift/engine/a.a(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServlet
Response;ILjava/lang/String;I)V(Unknown Source)[optimized]
at com/mshift/engine/MShiftStack.a(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/H
ttpServletResponse;)V(Unknown Source)
at com/mshift/engine/MShiftStack.<init>(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/h
ttp/HttpServletResponse;I)V(Unknown Source)
at C2HTService.doGet(C2HTService.java:35)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:690)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:803)
at org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
:290)
at org/apache/catalina/core/ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org/apache/catalina/core/StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org/apache/catalina/core/StandardContextValve.invoke(StandardContextValve.java:175)
at org/apache/catalina/core/StandardHostValve.invoke(StandardHostValve.java:128)
at org/apache/catalina/valves/ErrorReportValve.invoke(ErrorReportValve.java:104)
at org/apache/catalina/core/StandardEngineValve.invoke(StandardEngineValve.java:109)
at org/apache/catalina/connector/CoyoteAdapter.service(CoyoteAdapter.java:216)
at org/apache/jk/server/JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org/apache/jk/common/HandlerRequest.invoke(HandlerRequest.java:283)
at org/apache/jk/common/ChannelSocket.invoke(ChannelSocket.java:767)
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:697)
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=105169 idx=0x3c tid=18950 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x283
05c98[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at jrockit/vm/Locks.wait(Ljava/lang/Object;)V(Unknown Source)[inlined]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)[optimized
]
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x28
305c98[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=105170 idx=0x3e tid=18951 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x283
05a70[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at jrockit/vm/Locks.wait(Ljava/lang/Object;)V(Unknown Source)[inlined]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)[optimized
]
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x28
305a70[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=109449 idx=0x40 tid=7349 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)[inline
d]
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)[inlined]
at java/net/SocketInputStream.read(SocketInputStream.java:129)[optimized]
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)[optimized]
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)[optimized]
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)[optimized]
^-- Holding lock: java/io/BufferedInputStream@0x2abf48c0[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)[optimized
]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49713 idx=0x42 tid=23179 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)[inline
d]
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)[inlined]
at java/net/SocketInputStream.read(SocketInputStream.java:129)[optimized]
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)[optimized]
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)[optimized]
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)[optimized]
^-- Holding lock: java/io/BufferedInputStream@0x2aca6e20[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49714 idx=0x44 tid=23186 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x1bb
39008[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at java/lang/Object.wait()V(Native Method)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x1b
b39008[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=109451 idx=0x46 tid=7351 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x289
06380[fat lock]
.
.
.
.
.
.
at jrockit/vm/ExceptionHandler.throwPendingType()V(Native Method)
at jrockit/vm/RNI.contextMarker()V(Unknown Source)
at com/mshift/engine/a.if(Lorg/w3c/dom/Node;Ljava/lang/String;)Ljava/lang/String;(Unknown Sourc
e)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.bf(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.a(ZLorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.bk(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.a(ZLorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.bk(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.R(Lorg/w3c/dom/Node;)V(Unknown Source)[optimized]
at com/mshift/engine/a.Q()V(Unknown Source)[optimized]
at com/mshift/engine/a.a(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServlet
Response;ILjava/lang/String;I)V(Unknown Source)[optimized]
at com/mshift/engine/MShiftStack.a(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/H
ttpServletResponse;)V(Unknown Source)[optimized]
at com/mshift/engine/MShiftStack.<init>(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/h
ttp/HttpServletResponse;I)V(Unknown Source)
at C2HTService.doGet(C2HTService.java:35)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:690)[optimized]
at javax/servlet/http/HttpServlet.service(HttpServlet.java:803)
at org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
:290)[inlined]
at org/apache/catalina/core/ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[op
timized]
at org/apache/catalina/core/StandardWrapperValve.invoke(StandardWrapperValve.java:228)[optimize
d]
at org/apache/catalina/core/StandardContextValve.invoke(StandardContextValve.java:175)[optimize
d]
at org/apache/catalina/core/StandardHostValve.invoke(StandardHostValve.java:128)[optimized]
at org/apache/catalina/valves/ErrorReportValve.invoke(ErrorReportValve.java:104)[optimized]
at org/apache/catalina/core/StandardEngineValve.invoke(StandardEngineValve.java:109)
at org/apache/catalina/connector/CoyoteAdapter.service(CoyoteAdapter.java:216)[optimized]
at org/apache/jk/server/JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)[optimized]
at org/apache/jk/common/HandlerRequest.invoke(HandlerRequest.java:283)[optimized]
at org/apache/jk/common/ChannelSocket.invoke(ChannelSocket.java:767)
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:697)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49300 idx=0x14e tid=21001 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x1b9
93e60[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at java/lang/Object.wait()V(Native Method)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x1b
993e60[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49946 idx=0x160 tid=24337 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x1ba
7e428[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at java/lang/Object.wait()V(Native Method)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x1b
a7e428[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49947 idx=0x162 tid=24338 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)[inline
d]
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)[inlined]
at java/net/SocketInputStream.read(SocketInputStream.java:129)[optimized]
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)[optimized]
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)[optimized]
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)[optimized]
^-- Holding lock: java/io/BufferedInputStream@0x2ac752a0[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49958 idx=0x168 tid=24395 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)[inline
d]
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)[inlined]
at java/net/SocketInputStream.read(SocketInputStream.java:129)[optimized]
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)[optimized]
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)[optimized]
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)[optimized]
^-- Holding lock: java/io/BufferedInputStream@0x2e1a5920[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49960 idx=0x16c tid=24397 prio=5 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(Ljava/io/FileDescriptor;[BIII)I(Unknown Source)[inline
d]
at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.jav
a)[inlined]
at java/net/SocketInputStream.read(SocketInputStream.java:129)[optimized]
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)[optimized]
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)[optimized]
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)[optimized]
^-- Holding lock: java/io/BufferedInputStream@0x2ab873c8[thin lock]
at org/apache/jk/common/ChannelSocket.read(ChannelSocket.java:620)[inlined]
at org/apache/jk/common/ChannelSocket.receive(ChannelSocket.java:558)[inlined]
at org/apache/jk/common/ChannelSocket.processConnection(ChannelSocket.java:685)[optimized]
at org/apache/jk/common/ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49500 idx=0x18e tid=22045 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x198
12ae0[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at java/lang/Object.wait()V(Native Method)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x19
812ae0[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
"aRequest: -Completed-" id=49508 idx=0x196 tid=22091 prio=5 alive, in native, waiting, daemon
-- Waiting for notification on: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x198
73a80[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.wait(Ljava/lang/Object;J)V(Unknown Source)[inlined]
at java/lang/Object.wait()V(Native Method)[optimized]
at org/apache/tomcat/util/threads/ThreadPool$ControlRunnable.run(ThreadPool.java:658)
^-- Lock released while waiting: org/apache/tomcat/util/threads/ThreadPool$ControlRunnable@0x19
873a80[fat lock]
at java/lang/Thread.run(Thread.java:595)[optimized]
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
===== END OF THREAD DUMP ===============
-----Original Message-----
From: Peter Crowther [mailto:Peter.Crowther@melandra.com]
Sent: Wednesday, June 10, 2009 12:16 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat maxThreads Issue
> From: Jones, Keven [mailto:Keven.Jones@ncr.com] How do I
>
> A. get thread dumps when the processes are dying
The top of http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/ is good general reading.
kill -QUIT <pid of Java process>
If ps is confused by all the threads, depending on your Java version, you might be able to use jps (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html) to get the pid.
Depending on your Java version, jstack (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstack.html) will also give you thread dumps.
- Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by Peter Crowther <Pe...@melandra.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> How do I
>
> A. get thread dumps when the processes are dying
The top of http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/ is good general reading.
kill -QUIT <pid of Java process>
If ps is confused by all the threads, depending on your Java version, you might be able to use jps (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html) to get the pid.
Depending on your Java version, jstack (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstack.html) will also give you thread dumps.
- Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
I don't have any tomcat knowledge. Thank you for the reply.
How do I
A. get thread dumps when the processes are dying
And
B. You mentioned the engine and service name. I see we have Engine set to Standalone,
And I see the Service is catalina (?) which should I adjust?
Thx again
-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Sent: Wednesday, June 10, 2009 11:33 AM
To: Tomcat Users List
Subject: RE: Tomcat maxThreads Issue
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
>
> <!-- Define an AJP 1.3 Connector on port 8009 -->
> <Connector port="8011"
> enableLookups="false" protocol="AJP/1.3" redirectPort="8443"
> />
This is the connector Mark was referring to (he should have said AJP, not APR). Since you have no maxThreads attribute, it defaults to 200, which may or may not be appropriate for your expected load.
The real question is what are those 200 threads doing? Try taking a couple of thread dumps when you get into the problem and see what they're stuck on.
> <Engine name="Standalone" defaultHost="localhost"
> jvmRoute="mweb3a">
You really should have the <Engine> and <Service> names the same, to keep JMX happy.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Subject: RE: Tomcat maxThreads Issue
>
> <!-- Define an AJP 1.3 Connector on port 8009 -->
> <Connector port="8011"
> enableLookups="false" protocol="AJP/1.3" redirectPort="8443" />
This is the connector Mark was referring to (he should have said AJP, not APR). Since you have no maxThreads attribute, it defaults to 200, which may or may not be appropriate for your expected load.
The real question is what are those 200 threads doing? Try taking a couple of thread dumps when you get into the problem and see what they're stuck on.
> <Engine name="Standalone" defaultHost="localhost"
> jvmRoute="mweb3a">
You really should have the <Engine> and <Service> names the same, to keep JMX happy.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
Sorry, here is the complete server.xml file:
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="9011" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="81" protocol="HTTP/1.1"
server="-"
maxThreads="600" connectionTimeout="20000"
redirectPort="443" />
<!-- Awele 20070402 For SSL Requests, processed non-SSL,
due to Coyote SSL Accelerator -->
<!--
<Connector port="443" address="10.5.3.9" protocol="HTTP/1.1"
server="-"
secure="true"
maxThreads="600" connectionTimeout="20000"
/>
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8011"
enableLookups="false" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
-->
<Engine name="Standalone" defaultHost="localhost" jvmRoute="mweb3a">
<!--
<Engine name="Catalina" defaultHost="localhost">
-->
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="/usr/local/tomcat/webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b "%{Referer}i"
"%{User-Agent}i" %{Host}i %p" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server>
-----Original Message-----
From: Peter Crowther [mailto:Peter.Crowther@melandra.com]
Sent: Wednesday, June 10, 2009 11:19 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat maxThreads Issue
> From: Jones, Keven [mailto:Keven.Jones@ncr.com] Here is the complete
> config file. Thanks for the quick reply.
The list strips attachments - please paste inline.
- Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by Peter Crowther <Pe...@melandra.com>.
> From: Jones, Keven [mailto:Keven.Jones@ncr.com]
> Here is the complete config file. Thanks for the quick reply.
The list strips attachments - please paste inline.
- Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat maxThreads Issue
Posted by "Jones, Keven" <Ke...@ncr.com>.
Here is the complete config file. Thanks for the quick reply.
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Wednesday, June 10, 2009 11:14 AM
To: Tomcat Users List
Subject: Re: Tomcat maxThreads Issue
Jones, Keven wrote:
> Hello,
>
> I have Tomcat (can't figure out what version as the version.sh script
> is giving all kinds of errors) running on separate Linux servers. So
> an overview of my config is
> 1 web server, 4 app servers (tomcat), and 1 db server.
>
> We were seeing an increase in the httpd processes on the web server to the point where I had to increase the MaxClients on the apache 2 server to 2048. I finally figured out that the normal number of httpd daemons on the web server (50-100) was spiking due to tomcat processes stalling or going completely down.
>
> So I started looking at why tomcat was failing and I found this error message in the ACStarError.log :
>
>
> SEVERE: All threads (200) are currently busy, waiting. Increase maxThreads (200) or check the servlet status.
> So I checked the server.xml file and found the following:
>
> <Connector port="81" protocol="HTTP/1.1"
> server="-"
> maxThreads="600" connectionTimeout="20000"
> redirectPort="443" />
> <!-- Awele 20070402 For SSL Requests, processed non-SSL, due to Coyote
> SSL Accelerator -->
> <!--
> <Connector port="443" address="10.5.3.9" protocol="HTTP/1.1"
> server="-"
> secure="true"
> maxThreads="600" connectionTimeout="20000"
> />
> -->
> <!-- Define a SSL HTTP/1.1 Connector on port 8443
> This connector uses the JSSE configuration, when using APR, the
> connector should be using the OpenSSL style configuration
> described in the APR documentation -->
> <!--
> <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
> maxThreads="150" scheme="https" secure="true"
> clientAuth="false" sslProtocol="TLS" />
> -->
>
> So It looks like the maxThreads has already been increased to 600. The server has been rebooted and tomcat stopped/started multiple times. Again all servers are Red Hat 5.2. Is there an additional parameter that needs to be set in order for tomcat to actually increase the maxThreads ?
> Thank You
That is the http connector. What about the APR connector? You can leave out stuff that is commented out.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat maxThreads Issue
Posted by Mark Thomas <ma...@apache.org>.
Jones, Keven wrote:
> Hello,
>
> I have Tomcat (can't figure out what version as the version.sh script is giving all kinds of errors) running on separate Linux servers. So an overview of my config is
> 1 web server, 4 app servers (tomcat), and 1 db server.
>
> We were seeing an increase in the httpd processes on the web server to the point where I had to increase the MaxClients on the apache 2 server to 2048. I finally figured out that the normal number of httpd daemons on the web server (50-100) was spiking due to tomcat processes stalling or going completely down.
>
> So I started looking at why tomcat was failing and I found this error message in the ACStarError.log :
>
>
> SEVERE: All threads (200) are currently busy, waiting. Increase maxThreads (200) or check the servlet status.
> So I checked the server.xml file and found the following:
>
> <Connector port="81" protocol="HTTP/1.1"
> server="-"
> maxThreads="600" connectionTimeout="20000"
> redirectPort="443" />
> <!-- Awele 20070402 For SSL Requests, processed non-SSL,
> due to Coyote SSL Accelerator -->
> <!--
> <Connector port="443" address="10.5.3.9" protocol="HTTP/1.1"
> server="-"
> secure="true"
> maxThreads="600" connectionTimeout="20000"
> />
> -->
> <!-- Define a SSL HTTP/1.1 Connector on port 8443
> This connector uses the JSSE configuration, when using APR, the
> connector should be using the OpenSSL style configuration
> described in the APR documentation -->
> <!--
> <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
> maxThreads="150" scheme="https" secure="true"
> clientAuth="false" sslProtocol="TLS" />
> -->
>
> So It looks like the maxThreads has already been increased to 600. The server has been rebooted and tomcat stopped/started multiple times. Again all servers are Red Hat 5.2. Is there an additional parameter that needs to be set in order for tomcat to actually increase the maxThreads ?
> Thank You
That is the http connector. What about the APR connector? You can leave
out stuff that is commented out.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org