a couple of days ago a post went by talking about MySQL default timeout
being set to 8 hrs for connections... betting this might be your problem...

-----Original Message-----
From: Mindaugas Genutis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 3 June 2003 5:26 PM
To: [EMAIL PROTECTED]
Subject: IOException: failed to communicate with MySQL



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(MyS
QLGUILanguageManagerHelper.java:48)
        at
lt.ktu.distance.sql.GUILanguageManager.loadGUILanguages(GUILanguageManager.j
ava: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:2
10)
        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(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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.processConne
ction(Http11Protocol.java:392)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a: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]


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

Reply via email to