-
1. Re: AJP Connector currentThreadCount stays at maximum
normann Feb 10, 2009 5:14 AM (in response to konami)My setup has the same issue, which was introduced in the JBoss 4.2 series that upgraded from Tomcat 5.5 to Tomcat 6.
I suspect this has to do with the fact that Tomcat 6 doesn't support the *SpareThreads attributes on the connectors any more. The documentation says that one must define an element (which defines a thread pool) and reference it in the connector.
In my opinion, your case should be configured like this:<Executor name="default" minSpareThreads="5" maxThreads="256" /> <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3" emptySessionPath="true" enableLookups="false" redirectPort="8443" connectionTimeout="20000" executor="default" />
It you use other connectors as well, they might want to reference the executor as well. It seems that it's not possible to set maxSpareThreads any more.
I've tried fiddling with this in my own setup, but I end up in a situation where mod_jk ends up writing to closed Tomcat sockets which result in requests that lock until mod_jk times out. At this point, though, I don't have the time to look more into the matter. -
2. Re: AJP Connector currentThreadCount stays at maximum
normann Feb 10, 2009 5:17 AM (in response to konami)TIt seems that the forum lets me write HTML in the message. My previous message should have read:
The documentation says that one must define an<Executor>
element (which defines a thread pool) and reference it in the connector. -
3. Re: AJP Connector currentThreadCount stays at maximum
piko Feb 13, 2009 5:19 AM (in response to konami)Hi,
same issue with Jboss 5.0.
I try with your sample configuration, but it doesn't work: I see default value for maxThreads (200) for both connectors.
Any idea?
Thanks,
piko
This is my configuration:<!-- A HTTP/1.1 Connector on port 8080 --> <Executor name="active-executor" minSpareThreads="5" maxThreads="256" namePrefix="activeThread-" /> <Connector executor="active-executor" protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" connectionTimeout="20000" redirectPort="8443" acceptCount="100" emptySessionPath="true" enableLookups="false" /> <!-- A AJP 1.3 Connector on port 8009 --> <Connector executor="active-executor" protocol="AJP/1.3" port="8009" address="${jboss.bind.address}" redirectPort="8443" />
-
4. Re: AJP Connector currentThreadCount stays at maximum
peterj Feb 13, 2009 11:24 AM (in response to konami) -
5. Re: AJP Connector currentThreadCount stays at maximum
sra78 Feb 17, 2009 2:23 PM (in response to konami)In the executor, add 'maxIdleTime'. Below value will end idle threads after 10 minutes.
<Executor name="active-executor" minSpareThreads="5" maxThreads="256" namePrefix="activeThread-" maxIdleTime="60000"/>
-
6. Re: AJP Connector currentThreadCount stays at maximum
sambit_dixit Feb 26, 2009 2:34 PM (in response to konami)Hi,
Since Jboss 4.2.x uses Tomcat 6.0 connectors, you may have to try out the following.
In the AJP connectors node you can set like<Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3" emptySessionPath="true" enableLookups="false" redirectPort="8443" keepAliveTimeout="60000" maxThreads="200" connectionTimeout="60000" />
See if this helps. -
7. Re: AJP Connector currentThreadCount stays at maximum
spezam Apr 13, 2009 12:11 PM (in response to konami)Hi,
has anybody any input/solution on this thread?
I tried to implement the posted solution, without many effects.
thanks,
Matteo -
8. Re: AJP Connector currentThreadCount stays at maximum
peterj Apr 13, 2009 12:43 PM (in response to konami)spezam, more details would help, especially since the referenced solution works for others.
-
9. Re: AJP Connector currentThreadCount stays at maximum
spezam Apr 13, 2009 1:11 PM (in response to konami)PeterJ,
sorry for the lack of information.
I actually managed to implement the solution with the following code:<Executor name="active-executor" namePrefix="activeThread-" maxThreads="1000" minSpareThreads="30" maxIdleTime="60000" /> <Connector executor="active-executor" port="8009" address="${jboss.bind.address}" protocol="AJP/1.3" emptySessionPath="true" enableLookups="false" redirectPort="8443" maxThreads="1000" keepAliveTimeout="60000" connectionTimeout="600000" />
what I can't understand now is why the "Current thread busy:" is always 0, even if I can see loads of calls with State 'S' -
10. Re: AJP Connector currentThreadCount stays at maximum
konami Jul 23, 2011 11:37 AM (in response to spezam)I think it is not reflected correctly anymore in the tomcat status when executor is used. You can check from jmx-console though.
Go to /jmx-console and find for name={executor name},type=Executor on the page. activeCount should be the one we are looking for.
-
11. Re: AJP Connector currentThreadCount stays at maximum
ask4free Sep 21, 2011 2:17 PM (in response to konami)Konami, the value you are looking for in the AJP connector is currentThreadBusy . This parameter decreases when there are less threads being used, as you said the parameter currentThreadCount does never decrease, don't know why....