Re: MySQL java.net.SocketException: Broken pipe
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
...
...
Subject
Written By
Posted
September 04, 2005 07:54PM
September 04, 2005 09:40PM
September 05, 2005 01:50AM
February 23, 2006 10:48AM
February 23, 2006 10:52AM
February 23, 2006 10:57AM
Re: MySQL java.net.SocketException: Broken pipe
May 09, 2006 01:40PM
February 28, 2006 12:46AM
September 22, 2006 08:05AM
November 29, 2009 10:18AM
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.