Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
java.net.SocketException: Connection ended abnormally.

java.net.SocketException: Connection ended abnormally.

2005-08-29       - By Stephen More

 Back
Reply:     1     2     3  

I am currently using mysql-connector-java-3 (See http://ava-3.ora-code.com).1.7-bin.jar. I have written a
service that makes a connection to MySQL, then will sleep for a while, when
an item needs to get inserted it will wake up and insert the value. When the
connection sits idle for about 90 minutes I get the following exception:

java.net.SocketException Source code of java.net.SocketException: Connection ended abnormally.
at java/lang/Throwable Source code of java/lang/Throwable<init>(Throwable.java:195)
at java/lang/Exception Source code of java/lang/Exception<init>(Exception.java:41)
at java/io/IOException Source code of java/io/IOException<init>(IOException.java:40)
at java/net/SocketException Source code of java/net/SocketException<init>(SocketException.java:29)
at java/net/PlainSocketImpl Source code of java/net/PlainSocketImpl(PlainSocketImpl.java:417)
at java/net/SocketInputStream.available(SocketInputStream.java:217)
at com/mysql/jdbc/util/ReadAheadInputStream.available(
ReadAheadInputStream.java:214)
at com/mysql/jdbc/MysqlIO Source code of com/mysql/jdbc/MysqlIO(MysqlIO.java:776)
at com/mysql/jdbc/MysqlIO Source code of com/mysql/jdbc/MysqlIO(MysqlIO.java:1466)
at com/mysql/jdbc/MysqlIO Source code of com/mysql/jdbc/MysqlIO(MysqlIO.java:1622)
at com/mysql/jdbc/Connection Source code of com/mysql/jdbc/Connection(Connection.java:2376)
at com/mysql/jdbc/Connection Source code of com/mysql/jdbc/Connection(Connection.java:2297)
at com/mysql/jdbc/PreparedStatement Source code of com/mysql/jdbc/PreparedStatement(PreparedStatement.java
:1860)
at com/mysql/jdbc/PreparedStatement Source code of com/mysql/jdbc/PreparedStatement(PreparedStatement.java
:1957)
at com/mysql/jdbc/PreparedStatement Source code of com/mysql/jdbc/PreparedStatement(PreparedStatement.java
:1880)
at com/mysql/jdbc/PreparedStatement Source code of com/mysql/jdbc/PreparedStatement(PreparedStatement.java
:1741)


When I perform a netstat on the MySQL server I can still see an ESTABLISHED
connection, but I do not see that same ESTABLISHED connection on the MySQL
jdbc side.

My only guess is that something is killing this connection....Could this be
a bug in the connector ?

-Steve More