Try the latest MySQL driver (3.08). I had a similar problem recently with a StackOverflowError that was solved by upgrading.
3.08 lists "infinite loop with Connection.cleanup()." as one of the fixed bugs, which is what I suspect was causing the overflow problem. You'll still have to contend with the MySQL connection which times out after 8 hours, but you should be able to check for that and reconnect if necessary or use the autoReconnect parameter (http://www.mysql.com/documentation/connector-j/index.html) Steve > -----Original Message----- > From: Vikram Goyal [mailto:[EMAIL PROTECTED] > Sent: September 16, 2003 6:49 PM > To: Struts Users Mailing List > Subject: Stackoverflow after DB inactivity > > > Hello all, > > I am getting a Stackoverflow error in Tomcat 4.1+ after a > period of database > inactivity, typically (3+ hours). I am using Struts for the > front end and > while the non DB access pages work fine, as soon as access > to a page is > requested where data is to be fetched from the database, I get the > StackOverflow. This is not random and I can replicate the > error. The error > goes away however, when I try to access the same page twice > or thrice and > everything works fine after that. > > This error is appearing on both windows and linux, i.e., > Tomcat is on these > machines, although the database, MySQL 4 is running on > linux 9. The DB > access is through a connection pool I set up in Struts config for my > application using org.apache.commons.dbcp.BasicDataSource. > > The stack trace follows: > 2003-09-16 11:39:56 StandardWrapperValve[action]: > Servlet.service() for > servlet action threw exception > javax.servlet.ServletException: Servlet execution threw an exception > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFi > lter(Application > FilterChain.java:269) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(App > licationFilterCh > ain.java:193) > at > org.apache.catalina.core.StandardWrapperValve.invoke(Standar > dWrapperValve.ja > va:256) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineVa > lveContext.invok > eNext(StandardPipeline.java:643) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPip > eline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase. > java:995) > at > org.apache.catalina.core.StandardContextValve.invoke(Standar > dContextValve.ja > va:191) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineVa > lveContext.invok > eNext(StandardPipeline.java:643) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPip > eline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase. > java:995) > at > org.apache.catalina.core.StandardContext.invoke(StandardCont > ext.java:2416) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHo > stValve.java:180 > ) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineVa > lveContext.invok > eNext(StandardPipeline.java:643) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(Error > DispatcherValve. > java:171) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineVa > lveContext.invok > eNext(StandardPipeline.java:641) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo > rtValve.java:172 > ) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineVa > lveContext.invok > eNext(StandardPipeline.java:641) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPip > eline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase. > java:995) > at > org.apache.catalina.core.StandardEngineValve.invoke(Standard > EngineValve.java > :174) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineVa > lveContext.invok > eNext(StandardPipeline.java:643) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPip > eline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase. > java:995) > at > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapte > r.java:223) > at > org.apache.coyote.http11.Http11Processor.process(Http11Proce > ssor.java:601) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand > ler.processConne > ction(Http11Protocol.java:392) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndp > oint.java:565) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru > n(ThreadPool.jav > a:619) > at java.lang.Thread.run(Thread.java:534) > ----- Root Cause ----- > java.lang.StackOverflowError > > Any help, pointers appreciated. > > Regards, > Vikram > > > ------------------------------------------------------------ > --------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]