java.net.SocketException: Connection reset

I

ilianaza

Hi,

We have recently switched from Oracle to MySQL and began experiencing
similar problem with Weblogic 8.1 and MySQL 5.0.18. We get the
following error message after 8 hours of inactivity:

java.net.SocketException
MESSAGE: Connection reset

STACKTRACE:

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:113)
at
com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java
:113)
at
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNece
ssary(ReadAheadInputStream.java:160)
at
com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java
:188)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5215)
at
weblogic.jdbc.wrapper.PoolConnection.setAutoCommit(PoolConnection.java:
136)

We found out that MySQL's property "wait_timeout" was responsible for
8 hour wait before this error occurred. It was set to "28800" seconds.
We reset the value to 10 seconds that were able to replicate the error
after 10 seconds of inactivity.

The "wait_timeout" value is the number of seconds the server waits for
activity on a non-interactive connection before closing it. This
timeout applies only to TCP/IP and Unix socket file connections, not
to connections made via named pipes, or shared memory.
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

Setting this variable to some very large value seems like a work
around and don't want to do that. We also tried to find similar
variable on Weblogic's JDBC side, but could find any. Please let us
know if someone was able to solve this problem without any work
arounds.

Thanks,

Ilia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top