tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hermes Flying <>
Subject Re: Fw: Can not understand how maxThreads of Connectors works
Date Fri, 25 Jan 2013 09:16:07 GMT
I am using the correct server.xml.
In the version 5.5.36 the maxThreads of 0 has no effect due to this code in

 public void setMaxThreads(int maxThreads) {
    if( maxThreads > 0)

So what I observe is correct. I.e. with 0 there is no error and also my web application works
fine since it defaults to 200 threads.
Will check this out in Tomcat 6

 From: Christopher Schultz <>
To: Tomcat Users List <> 
Sent: Thursday, January 24, 2013 9:09 PM
Subject: Re: Fw: Can not understand how maxThreads of Connectors works
Hash: SHA256


On 1/24/13 12:14 PM, André Warnier wrote:
> Now, considering this, there are a number of possibilities : - the
> documentation is totally wrong - there is a bug in Tomcat - your
> Tomcat server is not using this server.xml - or, it being rather
> unlikely that processing 0 requests is what a normal user would
> want, the Tomcat developers have coded this so that an obviously
> nonsensical value of 0 would result in the default (of 200) being
> applied.

That last one is not true: the code will happily accept maxThreads=0
but then will throw an exception when the connector tries to actually
start its Executor.

I suspect Hermes is editing some unrelated server.xml file: his
observations seem totally in-line with that hypothesis.

Hermes, try modifying your server.xml file to be syntactically
incorrect. For example, put a "<!--" into the middle of the file and
try to start Tomcat. If it still starts, you are editing the wrong file.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message