Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java.net.SocketException: Connection reset

Reply
Thread Tools

java.net.SocketException: Connection reset

 
 
ilianaza@gmail.com
Guest
Posts: n/a
 
      01-31-2007
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(Read AheadInputStream.java
:113)
at
com.mysql.jdbc.util.ReadAheadInputStream.readFromU nderlyingStreamIfNece
ssary(ReadAheadInputStream.java:160)
at
com.mysql.jdbc.util.ReadAheadInputStream.read(Read AheadInputStream.java
:18
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.ja va:2803)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15 73)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 311
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/...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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
You will not be able to reset the access - can't reset. jc MCAD 0 12-09-2007 08:58 PM
Hang on socket close after connection reset or connection timed out Helene Unterwieser Java 14 07-02-2007 11:27 PM
CISCO 7XX / 761 password reset or reset to factory defaults Philipp Flesch Cisco 3 06-18-2006 07:47 PM
Connection Reset =?Utf-8?B?RGljb3Jwbw==?= Wireless Networking 0 10-08-2004 03:35 PM
Cisco VPN Client reset internet connection AK Cisco 0 06-19-2004 03:01 PM



Advertisments