tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: MySQL Database / Tomcat Exceptions
Date Mon, 06 Feb 2006 23:24:45 GMT
How are you creating the connection and are you trying to maintain it? 
Unless you are using a pool that is designed to deal with MySQL you need to 
handle the timeout of the connection to the db. If you are trying to hold 
onto the connection, MySQL will drop it after some time. To you app it will 
appear as lost communication.


----- Original Message ----- 
From: "Richard S. Huntrods" <huntrods@nucleus.com>
To: <users@tomcat.apache.org>
Sent: Monday, February 06, 2006 5:55 PM
Subject: MySQL Database / Tomcat Exceptions


> >
>>>> From: Richard S. Huntrods [mailto:huntrods@nucleus.com] Subject: RE: 
>>>> Would like to know what might be causing this exception in servlet
>>>>
>>>> I have one more. This *IS* a real error, and is caused by something 
>>>> breaking between MySQL and my servlets.
>>>
>>
>>(Should probably start a new thread for this, since it's a different
>>issue.)
>>
>>It looks like the other end (MySQL) decided to drop the connection.
>>Could be a timeout problem, or a network hiccup (e.g., somebody tripped
>>over a cable).  Is this reproducible?  Can you get a network capture of
>>the situation?
>>
>> - Chuck
>>
>>
>
> Thanks, Chuck. I am thinking along similar lines. The only problem is that 
> aside from the Java exception, there are no error messages in any other 
> Tomcat logs or MySQL logs.
>
> Here's another one from today:
>
>> DBMS SQLException. Time:Mon Feb 06 14:46:06 MST 2006
>> SQLException caught: keyLookup(login : 50768)
>> DBMS SQLException. Time:Mon Feb 06 14:46:06 MST 2006
>> SQL Problem: Communication link failure: java.io.IOException, underlying 
>> cause: Unexpected end of input stream
>>
>> ** BEGIN NESTED EXCEPTION **
>>
>> java.io.IOException
>> MESSAGE: Unexpected end of input stream
>>
>> STACKTRACE:
>>
>> java.io.IOException: Unexpected end of input stream
>>     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1405)
>>     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1775)
>>     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1020)
>>     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1109)
>>     at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1070)
>>     at com.mysql.jdbc.Connection.execSQL(Connection.java:2027)
>>     at com.mysql.jdbc.Connection.execSQL(Connection.java:1984)
>>     at com.mysql.jdbc.Statement.executeQuery(Statement.java:1152)
>>     at my.DBMS.keyLookup(Unknown Source)
>>     at my.Person.lookup(Unknown Source)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>     at 
>> org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
>>     at 
>> org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:133)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>     at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>     at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>     at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>     at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>     at 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
>>     at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>     at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>     at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
>>     at 
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
>>     at 
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>     at 
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>     at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>     at java.lang.Thread.run(Thread.java:595)
>>
>>
>> ** END NESTED EXCEPTION **
>>
>>
>> SQL State: 08S01
>> Vendor Error: 0
>
> Again, basically Tomcat seems to just "lose" the connection to MySQL. Any 
> suggestions?
>
> -Richard
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message