MySQL java.net.SocketException: Broken pipe
Posted by: Leo Chan
Date: September 04, 2005 07:54PM

Hi,

I have a MySQL server and client running at the same server. However, when running long times ~few hrs, it will come out some Exception as following :
21:54:34,438 ERROR [SpDataSource] com.mysql.jdbc.CommunicationsException: Commun
ications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2689)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2618)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1551)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:930)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
1024)
** END NESTED EXCEPTION **
Last packet sent to the server was 1 ms ago.

This kind of error came out in random. As I run the client and server at same host(localhost in driver setting) so it should not have network problem cause broken pipe. The MySQL version I use is 4.1.8 and JDBC Driver is 3.1.10. The socketTimeout of the driver has been set to"0". I use connection pool so that every connection is reused but not "new" on demand.

Please help to advise what's wrong.

Options: ReplyQuote


Subject
Written By
Posted
MySQL java.net.SocketException: Broken pipe
September 04, 2005 07:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.