Bug #18954 | java.sql.SQLException, MESSAGE: Communication link failure: java.io.EOFExceptio | ||
---|---|---|---|
Submitted: | 10 Apr 2006 14:26 | Modified: | 31 Mar 2014 11:42 |
Reporter: | gopala krishna Muppana | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | OS: | Linux (Redhat linux enterprise linux 3.) | |
Assigned to: | Alexander Soklakov | CPU Architecture: | Any |
[10 Apr 2006 14:26]
gopala krishna Muppana
[10 Apr 2006 15:09]
Valeriy Kravchuk
Thank you for a problem report. We need a repeatable test case to be able to find the reason and fix the bug, if any. Send your my.cnf content and error log's content for the appropriate period, please. I had also changed category to a more appropriate one.
[10 Apr 2006 16:17]
Mark Matthews
More than likely, you're running into "wait_timeout" killing your connection. This is from the manual at http://dev.mysql.com/doc/refman/5.0/en/cj-faq.html: 24.3.5.1.4: Question: I have a servlet/application that works fine for a day, and then stops working overnight Answer: MySQL closes connections after 8 hours of inactivity. You either need to use a connection pool that handles stale connections or use the "autoReconnect" parameter (see Section 23.3.3.1, “Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J”). Also, you should be catching SQLExceptions in your application and dealing with them, rather than propagating them all the way until your application exits, this is just good programming practice. MySQL Connector/J will set the SQLState (see java.sql.SQLException.getSQLState() in your APIDOCS) to "08S01" when it encounters network-connectivity issues during the processing of a query. Your application code should then attempt to re-connect to MySQL at this point.
[10 May 2006 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[31 Mar 2014 11:42]
Alexander Soklakov
I close this report as "Can't repeat" because there is no feedback for a long time and codebase is too old. Please, feel free to reopen it if the problem still exists in current driver.