Hi,
We are using tomcat 6.0.28, our goal is to figure out are we maxing out on
number of threads and I am looking at JIoEndpiont.java source code and found
the following code. So, looks like JIoEndpoint logs whenever all the worker
threads are busy, if i receive conncurrent connections more than maxThreads in
server.xml , i should see this logging message in catalina.out. So, how do i
enable the logs for this class org.apache.tomcat.util.net.JIoEndpoint.
if (curThreadsBusy == maxThreads) {
log.info(sm.getString("endpoint.info.maxThreads",
Integer.toString(maxThreads), address,
Integer.toString(port)));
}
I modified the following logging file: tomcat/conf/logging.properties, added
this entry to this file and bounced the server.
cat /usr/Interwoven/tomcat/conf/logging.properties | grep -A 4 -B 3 JIo
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers
= 5host-manager.org.apache.juli.FileHandler
org.apache.tomcat.util.net.JIoEndpoint.level = FINE
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
I also configured the server.xml as follows:
<Connector
port="1776"
maxThreads="8"
threadPriority="MAX_PRIORITY"
minSpareThreads="3"
maxSpareThreads="5"
enableLookups="false"
acceptCount="512"
debug="0"
connectionTimeout="20000"
useURIValidationHack="false"
disableUploadTimeout="true"
URIEncoding="UTF-8"/>
Then, i ran the test as follows which generates 500 concurrent request, as
there are only 8 max threads, i should get log message that all threads are
busy.
ab -n 1000 -c 500 http://localhost:1776/test.
In theory i should see the log message if i configured everything correctly.
So do you have any idea on what am i missing here. How do i see the logging for
JIoEndpoint class ?
Any insights would be helpful.
Thanks,
Ravi