On 23/01/2012 14:06, Daniel Mikusa wrote:
> On Mon, 2012-01-23 at 05:44 -0800, gnath wrote:
>> Hi all, 
>>
>>
>> We have Tomcat 6.0.35 in our production Environment running on Linux, and we 
>> have configured to use tomcatThreadPool with maxThreads=500 and 
>> minSpareThreads=50 with default connectionTimeout(which is 60000 sec). 
> 
>> We have two connectors (http and ssl) It has been giving some problems like 
>> 'too many open files' or just hangs once in a while which requires a restart 
>> to get back to normal. 
> 
> Have you taken any thread dumps when the server hangs?  What do you see?
> 
>>
>>
>> Recently i happened to check our access logs when the server hung and 
>> stopped responding. We were printing the thread number in the logs and i 
>> have seen the number going upto 770 (though the max is configured at 500). I 
>> was under impression that the threads will be shared among the connectors 
>> and max it can go to 500. Could you please explain why im seeing very high 
>> number than configured? Is that maxThreads value per connector?
> 
> It would help to see how you have your thread pool and connectors
> configured.  Please attach your server.xml minus any comments.
> 
> Also, a thread dump would be nice to confirm how many threads were
> actually running.

The maxThreads in the Connector only applies to Tomcat request
processing threads, it is not a limit imposed on the whole JVM.

You will usually have 20-30 threads running doing various things in
addition to those that your app starts.

If Tomcat is at 500 + 20 then the rest are likely to be started by your
application or dependencies.  As Dan states, a thread dump is the way to
understand this.


p





-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to