Thank you, Mr. Christopher Schultz.

If the keepalivetimeout value is the same, it is not the difference between 
tomcat7 and tomcat8 eventually, it is the Thread state corresponding to the 
inflowing request situation, so is normal operation?

What Java versions in each case?

--> Tomcat 7 : jdk 1.7.0.65
--> Tomcat 8 : jdk 1.8.0.131

All settings are the same.

#httpd.conf fragment on apache http server connected to Tomcat 7.

KeepAlive On
KeepAliveTimeout 30
MaxKeepAliveRequests 0
Timeout 60

#Tomcat 7 server.xml fragment
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="7009" protocol="AJP/1.3" redirectPort="9443" 
URIEncoding="UTF-8"
      acceptCount="200" acceptorThreadCount="2" maxThreads="300"
      minSpareThreads="50" connectionTimeout="15000"/>

#Tomcat 8 server.xml fragment
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="7009" protocol="AJP/1.3" redirectPort="9443" 
URIEncoding="UTF-8"
      acceptCount="200" acceptorThreadCount="2" maxThreads="300"
      minSpareThreads="50" connectionTimeout="15000"/>

#httpd.conf fragment on apache http server connected to Tomcat 8.

KeepAlive On
KeepAliveTimeout 30
MaxKeepAliveRequests 0
Timeout 60

Best regards!

-----Original Message-----
From: Christopher Schultz <ch...@christopherschultz.net> 
Sent: Friday, March 30, 2018 1:15 AM
To: users@tomcat.apache.org
Subject: Re: Is the thread status of tomcat 8.0.44 normal?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

이의준,

On 3/28/18 8:28 PM, 이의준 wrote:
> I posted the same question a few days ago, but it was not a 
> satisfactory answer.
> 
> So I ask again.
> 
> 
> 
> Test sequence and inquiry contents
> 
> 1. In the local test, the same load (hp-jmeter) for tomcat 7, 8 5 
> minutes,

What Java versions in each case?

> 2. Thread dump generated after 5 minutes of load termination
> 
> 3. Most Thread in Tomcat 7 is in TIME_WAITING state (normally OK)
> 
> 4. Thread in Tomcat 8 mostly RUNNABLE state (estimated to be
> abnormal)
> 
> Thread Final Stack - Below (reading something)
> 
> at org.apache.tomcat.jni.Socket.recvbb (Native Method)

These threads are blocked, reading from the socket. They are likely in 
"keep-alive" status, meaning that they are waiting for the client to send more 
data. These threads are not "busy".

> 5. Is the thread status of Tomcat 8 normal?

Yes.

> Please let us know if we need additional resources to analyze this 
> issue.

Yous stack traces are showing threads in different states -- not just different 
"thread states" but also doing different things. Some threads are doing 
"nothing", waiting for the thread-pool to use them for something. Other threads 
are waiting on data to arrive on the socket .

If you wait for keepAliveTimeout ms, you should see the "RUNNABLE"
threads to into the "TIME_WAITING" status because they give-up on any 
subsequent keep-alive request.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq9EPsACgkQHPApP6U8
pFgP6hAAmprN368RAMi5BZK/zN/X70AaGefuahZhiMdWM01353g3nANMllFSQc65
N70JEpwr6sUJJgGqqqmpXDxn3A/Qj1pePxjB3jPhMcPAKtm61u+yULM4+fwrPftQ
Gw3mi7ULE3ywkUUMcDGW9+Ur3DneDLlwG0Xp6lnUO3Yu90QyLm9WCIsyNIMZhuya
I/+phfra3b5W8TI60S6LitdfdzJidxyjVmhBGI0FVjMWmyYURMHVBbuKZk7xePG4
m7bHlh39ZK1rjcU9oXbo8s4fiMPgmdmVKMOdKmdOEAYoDLHxu1kolCcu1NA1ev0k
v6t3SjSEr3jA2177Gb7kKG9NerFkt/3ZMylHizWTlWPNNi3A1r9N0XJK2Ft+TnI6
xd+Up/eRVZnyCrtQCn47sK6uJDXuoRiAsfsGejBYnF6e6RfDoIoKThn1uWLhe2Nk
KW8YHyPhChK/OeG3A254VelEqk3Qd4lEVMcTcFL8uLciOy0JeqJD7o+F3Y0HMwL4
b2iDgziX/GwqdIxPGmrDvImslmqq/RxC+w/x3ks6DaJiYliCmC7kqPZ1UeANHotq
yTdMieyUJuMa6gHgrFyClhtT/FxxeK+/sPt5t1sjRv+qR11iM7EWAkRGYFT6XET/
2hnQIRJeMksitbkykU6vpm9+tqoUF9Y+TPQM7R3xSvoZMTq0p8U=
=P+uc
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to