Details
Description
Hi,
I'm using PB-API to make connections to MySQL database on Fedora Fc4.0. Everything works fine until after the system stay idle for a couple of hours. When I access the site again, the system throw the following exception for database connection. Seems the program got a un-closed connection from pool. If I try to access the database again, it works fine again. I'm not sure whether this is a bug or not. Please advise.
Thanks in advance.
William
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: SQLException during th
e execution of the query (for com.diygifts.giftlab.valueobject.MemberVO): Commun
ications link failure due to underlying exception:
-
- BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Connection reset by peer: socket write error
STACKTRACE:
java.net.SocketException: Connection reset by peer: socket write error
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)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAcc
essImpl.java:312)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryO
bject.java:74)
at org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:1
85)
at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsI
teratorFactoryImpl.java:58)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue
ry(PersistenceBrokerImpl.java:1918)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery
(PersistenceBrokerImpl.java:1493)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Per
sistenceBrokerImpl.java:1620)