If you are getting the following error in your Tomcat server logs “SEVERE: All threads (250) are currently busy, waiting. Increase maxThreads (250) or check the servlet status” then one option is to try to increase maxThreads limit. After the change restart the application server with JVMCP or command line.
Aside from increasing the maxThreads parameter in ~/appserver/apache-tomcat/conf/server.xml you can also find out what are the threads busy with. You can get a thread dump by pressing the following at the command prompt: Ctrl+\ for Unix/Linux or Ctrl+Break for windows machines. If you are running your application as a background process in Linux, you could execute kill -QUIT from another command prompt. The above signals the VM to generate a full thread dump. Sun’s VM prints the dump on the error stream while IBM’s JDK generates a new file with the thread dump every time you send the signal. To check what are the threads busy with login to your account via SSH. You will need to identify your java process ID <VMPID>. Run:
user@gemini [~]# cd ~/appservers/apache-tomcat/logs user@gemini [~]# cp catalina.out catalina.out.bak user@gemini [~]# :>catalina.out user@gemini [~]# ps x user@gemini [~]# kill -QUIT <VMPID> user@gemini [~]# grep '^"' catalina.out | sort
Thread dump will go by default into catalina.out.