tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "emerson cargnin" <echofloripa.y...@gmail.com>
Subject Blocked threads in tomcat
Date Fri, 31 Oct 2008 12:07:06 GMT
Hi Guys

We have our latest release going through the QA now, and during load
tests after a certain number of users (around 40) the threads starting
to block and the response time goes through space. Worth mentioning
that each calls another two local service in the same server, so that
will have at least three times threads than the number of users. But
if we are simulating 40 users, it would start maximum of 120 threads.

The connector is configured as follows:

<Connector port="18081" maxHttpHeaderSize="8192"
               maxThreads="750" minSpareThreads="125" maxSpareThreads="375"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

It seems a lot of the threads are getting blocked. Looking at the
configuration, what could be that is blocking tomcat?

Below is the JConsole result, you can see that there are a lot of
blocked threads on there.

Name: http-18081-Processor95
State: WAITING on
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool@512410a
Total blocked: 106  Total waited: 129

Stack trace:
java.lang.Object.wait(Native Method)
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnectionManager.java:518)
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHttpConnectionManager.java:416)
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
com.yell.keywordinterpreter.client.query.KeywordInterpreterQuery.sendRequest(KeywordInterpreterQuery.java:99)
com.yell.keywordinterpreter.client.KeywordInterpreterClientInterface.doUCSKeywordInterpretation(KeywordInterpreterClientInterface.java:45)
com.yell.ucssearch.search.interpreterstage.keyword.KeywordInterpreterStage.runKeywordInterpreterWebserviceQuery(KeywordInterpreterStage.java:157)
com.yell.ucssearch.search.interpreterstage.keyword.KeywordInterpreterStage.interpret(KeywordInterpreterStage.java:82)
com.yell.ucssearch.search.interpreterstage.UserTermsIntepreter.interpret(UserTermsIntepreter.java:47)
com.yell.ucssearch.search.SearchLogic.getInterpretedUserTermsResponse(SearchLogic.java:374)
com.yell.ucssearch.search.SearchLogic.runFullSearch(SearchLogic.java:107)
com.yell.ucssearch.api.response.DoUcsSearch.doPost(DoUcsSearch.java:160)
com.yell.ucssearch.api.response.DoUcsSearch.doGet(DoUcsSearch.java:123)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)


Name: http-18081-Processor99
State: WAITING on
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable@11eff48d
Total blocked: 617  Total waited: 271

Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:474)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:661)
java.lang.Thread.run(Thread.java:595)


Name: http-18081-Processor125
State: RUNNABLE
Total blocked: 720  Total waited: 17,006

Stack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:738)
org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:399)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)
_____________________________________________________

---------------------------------------------------------------------
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


Mime
View raw message