-
1. Re: GC does not appear to be running
peterj Jan 14, 2009 4:11 PM (in response to sra78)GC has nothing whatsoever to do with the HTTP threads - those are all handle by JBoss Web.
You never said which version of JBoss AS you are using, but the 4.2.x and 5.0 version use a JBoss Web based on Tomcat 6. If you look at the Tomcat 6 documentation you will notice that the various thread management settings (such as the unused thread timeout) are no longer documented. A perusal of the source code shows that those settings are still captured from server.xml, but the settings are never used. The end result is what you see - once HTTP threads have been allocated they seem to hang around forever. -
2. Re: GC does not appear to be running
sra78 Jan 20, 2009 9:53 AM (in response to sra78)Thanks Peter.
I did not know that GC will not flush HTTP threads. I thought since memory is taken by threads, I simply assumed it is GC's job.
I am using JBoss 4.2.2. I will look up Tomcat documentation and see if I can find information on how to close unused threads. I will post with details if I succeed. -
3. Re: GC does not appear to be running
sra78 Jan 20, 2009 11:47 AM (in response to sra78)Per Tomcat Mail Archives and from Tomcat documentation, http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html, I used 'Executor' to remove idle threads.
I added Executor in service.xml,<Executor name="appThreadpool" namePrefix="APP-http-" maxThreads="200" minSpareThreads="50" maxIdleTime="60000" />
, and used the Executor in Connector,<Connector executor="appThreadpool" ...... />
Now, after 60 seconds of running stress test, the HTTP thread count is back to 50-60. -
4. Re: GC does not appear to be running
parressh Nov 6, 2009 7:13 PM (in response to sra78)I've tried adding the executor to the server.xml file so that the threads would come down after peak load based on this forum thread but it is not working for me. Could someone let me know what I have done wrong? Here's the relevant snippet from the server.xml file.
Thanks<Service name="jboss.web"> <Executor name="active-executor" namePrefix="activeThread-" maxThreads="40" minSpareThreads="10" maxIdleTime="60000" /> <!-- A HTTP/1.1 Connector on port 8080 --> <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" executor="active-executor" connectionTimeout="20000" redirectPort="8443" maxThreads="40" />
-
5. Re: GC does not appear to be running
peterj Nov 9, 2009 11:08 AM (in response to sra78)Try taking the dash out of the name.
-
6. Re: GC does not appear to be running
parressh Nov 11, 2009 11:19 AM (in response to sra78)Hi Peter, unfortunately, that didn't work. Here's what I tried:
<Service name="jboss.web"> <Executor name="TomcatExecutor" namePrefix="tomcatThread" maxThreads="40" minSpareThreads="10" maxIdleTime="60000" /> <!-- A HTTP/1.1 Connector on port 8080 --> <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" executor="TomcatExecutor" connectionTimeout="20000" redirectPort="8443" />
-
7. Re: GC does not appear to be running
peterj Nov 11, 2009 12:48 PM (in response to sra78)I do not see anything obviously wrong with your settings. Looks like it is debugging time...