Setting maxThreads up to 300 should be fine - there are no fixed rules. It depends on whether you see any connections failing.
Increasing too many causes high memory consumption, but Tomcats production is known to work with 750 threads. See here also. http://java-monitor.com/forum/showthread.php?t=235
Are you sure you got the SEVERE error? I tested our Tomcat 6.0.20 and it forwards the INFO message when crossing maxThreads.
INFO: Maximum number of threads (200) created for connector with address null and port 8080
It does not refuse connections until the acceptCount value is crossed. The default value is 100.
From Tomcat docs http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
The maximum queue length for incoming connection requests when everything is possible using request processing threads. Any requests received in the queue will be completely denied. The default value is 100.
How it works,
1) As the number of simultaneous requests increases, threads will be created up to the configured maximum (value of the maxThreads attribute).
So, in your case, at this moment the message "Maximum number of threads created (200)" will appear. However, requests will still be queued for service.
2) If more concurrent requests are received, they are queued up to the configured maximum (value of the acceptCount attribute).
Thus, 300 requests can be accepted without fail. (assuming your acceptCount defaults to 100)
3) Crossing this number causes Connection Refused errors until resources are available for processing them.
So you should be fine until you click on step 3
JoseK
source share