[SOLVED] Connection Timeout using Oracle with Tomcat
I finally solved the problem I was having where the DBCP Connection Pool in Tomcat kept getting closed. At first, I thought it was happening every 24 hours. After we configured connection logging in Oracle, we discovered it was happening every 2 hours. After posting numerous (likely annoying) messages to tomcat-user and struts-user (with no resolution), I looked up my local Oracle user-group mailing list and fired off a message.
The first (and only) response solved my problem. It said I should check and see if there is a connection timeout on the firewall. Sure 'nuff, 90 minutes. So I wrote a DBPingServlet, coupled with an Ant task to make an HTTP Request to get the servlet, and scheduled it as a cron job. Whalla - the problem is fixed! Thank God - it was annoying to restart Tomcat every 2 hours! Of course, if folks where actually using our application - this would've never been an issue... ;-)
Posted by Max Haase on July 17, 2007 at 12:38 PM MDT #