Hello,

My JSP application very often after night, in the morning stops 
communicating with MySQL database. I get an exception each morning (the 
exception body goes below). The application starts to work again after I 
restart it from the Tomcat Manager.

Maybe someone else also had this same problem? My server configuration: 
Linux Redhat, Tomcat 4.1.24, Java 1.4.1. 

My assumptions where the problem might be: the MySQL connections are 
"eaten" by another application or they are "eaten" by my application 
somewhere inside and never closed. Or maybe during the night when no one 
is working with my application it somehow "frozes"? Can anyone give me a 
clue how to start debugging these early morning crashes?

Another clue: Connections to the database are made through an SQLManager 
which is a class written by another programmer. The class is a singleton. 
Could it be that I have to reset it more often?

The exception body goes here:

java.sql.SQLException: Communication link failure: java.io.IOException
        at com.mysql.jdbc.MysqlIO.clearAllReceive(Unknown Source)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
        at com.mysql.jdbc.MysqlIO.sqlQuery(Unknown Source)
        at com.mysql.jdbc.Connection.execSQL(Unknown Source)
        at com.mysql.jdbc.Connection.execSQL(Unknown Source)
        at com.mysql.jdbc.Statement.executeQuery(Unknown Source)
        at com.mysql.jdbc.jdbc2.Statement.executeQuery(Unknown Source)
        at 
lt.ktu.distance.sql.mysql.MySQLGUILanguageManagerHelper.loadGUILanguages(MySQLGUILanguageManagerHelper.java:48)
        at 
lt.ktu.distance.sql.GUILanguageManager.loadGUILanguages(GUILanguageManager.java:55)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:155)
        at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
        at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
        at java.lang.Thread.run(Thread.java:536)

Thanks,

-- 
Kaunas Regional Distance Education Center
Programmer
Phone: +370 674 05232
WWW: http://distance.ktu.lt


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to