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
org.apache.tomcat.util.net.PoolTcpEndpoint
public void setMaxThreads(int maxThreads) {
if( maxThreads > 0)
tp.setMaxThreads(maxThreads);
}
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 <[email protected]>
To: Tomcat Users List <[email protected]>
Sent: Thursday, January 24, 2013 9:09 PM
Subject: Re: Fw: Can not understand how maxThreads of Connectors works
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
André,
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREIAAYFAlEBhv8ACgkQ9CaO5/Lv0PDUWgCfWY/BUyhl4rQkZUC19SNB2P72
sckAn2dZwfEd7uVZz6eg0HuPmuZC81j6
=YVBj
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]