If you are receiving the "Please increase maxThreads" error, it means that the Apache Tomcat HTTP connector is unable to create a new thread to handle a new request because the maximum number of threads has been reached. This can occur when there is a high number of concurrent requests to the server, or when the default value for the maxThreads
attribute is too low for your use case.
To increase the value of maxThreads
, you will need to edit the server.xml
file, which is typically located in the conf
directory of your Tomcat installation. Locate the <Connector>
element that corresponds to the HTTP connector, and set the maxThreads
attribute to the desired value. For example:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxThreads="200" />
After modifying the server.xml
file, restart Tomcat for the changes to take effect. It's important to note that increasing the value of maxThreads
can have an impact on the performance and memory usage of your server, so make sure to choose a value that is appropriate for your particular use case.