Communication link failure
Posted by: sukumar madawat
Date: August 20, 2010 07:31AM

Hi,
I am working with large data set. I have created 100 tables. each table has same schema (12 columns) and 10,000 rows.
There are 50 threads on each table that fires select * from table query .


I am using streaming resultset. i am closing connections, statements and resultset after using it. after running 40 - 50 min. it throws the exception:

com.mysql.jdbc.CommunicationsException: Communications link failure

Last packet sent to the server was 2217953 ms ago.
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1405)
at com.mysql.jdbc.RowDataDynamic.nextRecord(RowDataDynamic.java:413)
at com.mysql.jdbc.RowDataDynamic.next(RowDataDynamic.java:392)
at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:7034)
at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:169)

Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2428)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2938)
... 11 more

The same code works fine for lesser no of tables and threads.

i have set multiple timeout in my.ini file.

connect_timeout = 31536000
interactive_timeout = 31536000
wait_timeout = 31536000
net_write_timeout = 31536000

If anybody have any idea about it. Please guide me.
Thanks
Sukumar

Options: ReplyQuote


Subject
Written By
Posted
Communication link failure
August 20, 2010 07:31AM


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.