You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by 止观梅 <ne...@gmail.com> on 2012/02/14 09:12:18 UTC
Almost all threads are in "P" status
Hi,
I'm encountering a problem:
1. almost all threads are in "P" status, and occasionally there is 1 or 2
in "S" or "R" status,
2. and there is no slow query on MySQL side, because I can't catch any
process with command "show full processlist",
3. while tomcat connection rate is merely less than 30req/s,
4. and tomcat CAN response correct result page in acceptable time(1 second)
System architecture: Tomcat*3 + Memcached*2 + MySQL-Proxy*2 + MySQL*2,
Linux-Redhat
Software information: apache-tomcat-7.0.6, MySQL--5.5.11-1.rhel5.x86_64,
jdk-6u23-linux-x64-rpm
Configuration:
tomcat server.xml:
1. <Connector port="8080" protocol="HTTP/1.1"
2. connectionTimeout="20000"
3. redirectPort="8443" />
which provides default maximum number of threads is 200
Screenshot: please refer to attachment.
Question:
1. is this situation(full of "P" status) problematic?
2. how to explain the situation?(waiting for Http request body? sounds
unreasonable!)
Re: Almost all threads are in "P" status
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
止观梅,
On 2/14/12 3:12 AM, 止观梅 wrote:
> I'm encountering a problem: 1. almost all threads are in "P"
> status, and occasionally there is 1 or 2 in "S" or "R" status,
Are you talking about looking at the threads in 'top' or somewhere
else? Java thread dumps usually say something like "RUNNING" as their
status, and 'top' (on Linux) doesn't have a 'P' state. So, what are
you talking about?
> 2. and there is no slow query on MySQL side, because I can't catch
> any process with command "show full processlist",
Oh, so you're running MySQL? Are you talking about OS threads or Java
threads?
> 3. while tomcat connection rate is merely less than 30req/s,
Oh, good. Tomcat is somewhere in this mix.
> 4. and tomcat CAN response correct result page in acceptable time(1
> second)
Great.
> Software information: apache-tomcat-7.0.6
You seriously need to upgrade: 7.0.6 was the first non-beta version of
Tomcat 7.0.x and many many things have been fixed since then. Current
version is 7.0.25.
> Screenshot: please refer to attachment.
Images are stripped from posts. Please either ZIP the screenshot
(sometimes works), post the screnshot somewhere like dropbox and give
us a link, or try to describe what the screenshot shows.
> Question: 1. is this situation(full of "P" status) problematic?
That depends on what 'P' means. If it means "*P*erfectly Fine" then I
suspect things are okay.
> 2. how to explain the situation?(waiting for Http request body?
> sounds unreasonable!)
If you want to know what Tomcat is doing, take a thread dump.
http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk86l7MACgkQ9CaO5/Lv0PDrkQCfQB3eZC0lhG692mIcDHVcgru3
5coAmgJC+QzsmTKi9c4qiqrBvHt+t5c0
=02Bm
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org