[ajug-members] Web Application running on Tomcat hangs while connecting to DB

Mike Millson mgm at meritonlinesystems.com
Sun Jun 17 15:01:12 EDT 2007


hsaid at checkfree.com wrote:
> Members,
> Here is the scenario:
> - The web application running on Tomcat makes a connection to the datbase 
> and waits for the response
> - The processes on the Database max out so the Database node hangs
> - The application goes into the hang mode waiting for the response from 
> the application.
>
> My question is : Is there a setting in Tomcat that would timeout the 
> application if the response packet from the application does come back 
> within a specified range? I know there is something one can do at the os 
> level for example for windows by change the TCP_Wait time by changing the 
> registry, similarly for Solaris. Is this the only solution that is at the 
> OS level that can be applied, or Tomcat has some setting that can timeout 
> the connection if the response is taking too much time?
The functionality you are looking for is available if you use a 
connection pool. Tomcat has commons-dbcp included. Please see the following:
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

Mike




More information about the ajug-members mailing list