Home > Archive > MySQL Java > May 2005 > Communications link failure due to underlying exception









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Communications link failure due to underlying exception
Joji George

2005-05-19, 3:23 am

Hi All,
Our application uses MySQL 4.1.11 and Connector/J 3.1.8. On one of our =
server machines, we get the following error after a few days(around 4-5 =
days):

com.mysql.jdbc. CommunicationsExcept
ion: Communications link failure due =
to underlying exception:=20

** BEGIN NESTED EXCEPTION **=20

java.net.SocketException
MESSAGE: Software caused connection abort: socket write error

STACKTRACE:

java.net.SocketException: Software caused connection abort: socket write =
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io. BufferedOutputStream
.flushBuffer(Unknown Source)
at java.io. BufferedOutputStream
.flush(Unknown Source)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512)
at com.mysql.jdbc.MysqlIO. sqlQueryDirect(Mysql
IO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)
at com.mysql.jdbc.Statement. executeQuery(Stateme
nt.java:1169)

The autoconnect parameter has been set for the driver. It happens on a =
windows 2000 machine with very low database access.

Any suggesstion/corrections?

Regards,
Joji George

--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=3...sie.nctu.edu.tw

Tetsuro IKEDA

2005-05-19, 3:23 am

Hi Joji,

Did you read this?
http://dev.mysql.com/doc/connector/....html#id2787172

MySQL closes connections after 8 hours of inactivity.
And even if you set the autoreconnect=true, you should be catching
SQLExceptions in your application and dealing with them.

But you also need to becareful for using autoReconnect function,
because autoReconnect will be depcreated in the future.

For detail, see the Mark Matthews comment of this.
http://bugs.mysql.com/bug.php?id=5020

Regards,
--Tetsuro

Joji George wrote:
> Hi All,
> Our application uses MySQL 4.1.11 and Connector/J 3.1.8. On one of our server machines, we get the following error after a few days(around 4-5 days):
>
> com.mysql.jdbc. CommunicationsExcept
ion: Communications link failure due to underlying exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: Software caused connection abort: socket write error
>
> STACKTRACE:
>
> java.net.SocketException: Software caused connection abort: socket write error
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at java.net.SocketOutputStream.socketWrite(Unknown Source)
> at java.net.SocketOutputStream.write(Unknown Source)
> at java.io. BufferedOutputStream
.flushBuffer(Unknown Source)
> at java.io. BufferedOutputStream
.flush(Unknown Source)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512)
> at com.mysql.jdbc.MysqlIO. sqlQueryDirect(Mysql
IO.java:1622)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)
> at com.mysql.jdbc.Statement. executeQuery(Stateme
nt.java:1169)
>
> The autoconnect parameter has been set for the driver. It happens on a windows 2000 machine with very low database access.
>
> Any suggesstion/corrections?
>
> Regards,
> Joji George
>


--
Tetsuro Ikeda, Intern
MySQL Inc, www.mysql.com
Office: +1-206-336-2030
Are you MySQL certified? www.mysql.com/certification

--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=m...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com