Re: MySQL java.net.SocketException: Broken pipe
Posted by: Martin Malo
Date: May 09, 2006 01:40PM

Our setup is pretty much the same - Anson below - except that we had newer version of MySQL and c3p0 and we encounter the same problem when we force our app to execute many SELECT queries on our DB through Hibernate and c3p0. Isn't there a solution to this?

Anson Parker wrote:
> I am having the same issues as Simon. I'm using
> the c3p0 connection pool very conservatively set
> up to test connections on checkout, throw away
> idle connections after a minute etc. etc.
>
> I still randomly get these
> java.net.SocketException: Broken pipe exceptions
> however.
>
> I am running tomcat and mysql on the same host, so
> I can rule out network issues as well as the more
> common connection timeout issues.
>
> Is there some hard information I can provide to
> help resolve this?
>
> All up, my setup is
> MySQL 5.0.19
> Tomcat 5.5.12
> Hibernate 3.1.2
> c3p0 0.9.0
> mysql-connector-java-3.1.12
> jdk1.5.0_06
>
>
> A typical exception looks like this:
>
> com.mysql.jdbc.CommunicationsException
> MESSAGE: Communications 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(SocketOutp
> utStream.java:92)
> at
> java.net.SocketOutputStream.write(SocketOutputStre
> am.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedO
> utputStream.java:65)
> at
> java.io.BufferedOutputStream.flush(BufferedOutputS
> tream.java:123)
> at
> com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2692)
> at
> com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
> at
> com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15
> 52)
> at
> com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java
> :1666)
> at
> com.mysql.jdbc.Connection.execSQL(Connection.java:
> 2994)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(P
> reparedStatement.java:936)
> at
> com.mysql.jdbc.PreparedStatement.executeQuery(Prep
> aredStatement.java:1030)
> at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement
> .executeQuery(NewProxyPreparedStatement.java:76)
> at
...
...

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL java.net.SocketException: Broken pipe
May 09, 2006 01:40PM


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.