title: Prevent thread blocking in Tomcat
body: <p>I have a Java servlet that acts as a facade to other webservices deployed on the same Tomcat instance. My wrapper servlet creates <strong>N</strong> more threads, each which invokes a webservice, collates the response and sends it back to the client. The webservices are deployed all on the same Tomcat instance as different applications.</p>
  
  <p>I am seeing thread blocking on this facade wrapper service after a few hours of deployment which brings down the Tomcat instance. All blocked threads are endpoints to this facade webservice (like <strong>http://domain/appContext/facadeService</strong>)</p>
  
  <p>Is there a way to control such thread-blocking, due to starvation of available threads that actually do the processing? What are the best practices to prevent such deadlocks?</p>