ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: java.net.SocketException: Broken pipe
Date Sat, 02 Apr 2005 03:12:57 GMT
yep, you need to setup your pool to use a pingQuery. It will validate
the connection and if it fails it will refresh it.

Brandon

On Apr 1, 2005 7:43 PM, SHS Enterprises <shsenterprises@hotmail.com> wrote:
>  
> Hi, 
>   
> I'm using an older version of IBATIS with MySQL database.  When the
> application is left unused for a period of time I get a Broken pipe error,
> the following: 
>   
> 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:66)
>  at
> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
>  at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2620)
>  at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2551)
>  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1515)
>  at
> com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
>  at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
>  at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
>  at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1812)
>  at
> com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657)
>  at
> com.ibatis.db.sqlmap.MappedStatement.runQueryForList(Unknown
> Source)
>  at
> com.ibatis.db.sqlmap.MappedStatement.executeQueryForList(Unknown
> Source)
>  at com.ibatis.db.sqlmap.SqlMap.executeQueryForList(Unknown
> Source) 
>   
> I believe this is a timeout error where the connection is not reIeased and a
> new one made. 
>   
> http://bugs.mysql.com/bug.php?id=7195 
>   
> Is this a common error found by anyone else?  I haven't looked at the IBATIS
> source, can anyone point me to the code where I would have to fix this? 
> Thanks ahead of time for any help you can offer.

Mime
View raw message