SQLRecoverableException: I/O Exception: Connection reset
This simply means that something in the backend ( DBMS ) decided to stop working due to unavailability of resources etc.
It has nothing to do with your code or the number of inserts.
You can read more about similar problems here:
- http://kr.forums.oracle.com/forums/thread.jspa?threadID=941911
- http://forums.oracle.com/forums/thread.jspa?messageID=3800354
This may not answer your question, but you will get an idea of why it might be happening. You could further discuss with your DBA and see if there is something specific in your case.
When is java.io.IOException:Connection reset by peer thrown?
java.io.IOException: Connection reset by peer
The other side has abruptly aborted the connection in midst of a transaction. That can have many causes which are not controllable from the server side on. E.g. the enduser decided to shutdown the client or change the server abruptly while still interacting with your server, or the client program has crashed, or the enduser's internet connection went down, or the enduser's machine crashed, etc, etc.
What's causing my java.net.SocketException: Connection reset?
The javadoc for SocketException states that it is
Thrown to indicate that there is an error in the underlying protocol such as a TCP error
In your case it seems that the connection has been closed by the server end of the connection. This could be an issue with the request you are sending or an issue at their end.
To aid debugging you could look at using a tool such as Wireshark to view the actual network packets. Also, is there an alternative client to your Java code that you could use to test the web service? If this was successful it could indicate a bug in the Java code.
As you are using Commons HTTP Client have a look at the Common HTTP Client Logging Guide. This will tell you how to log the request at the HTTP level.
Related Topics
Force Jvm to Do All Io Without Page Cache (E.G. O_Direct)
Too Many Open Files Error But Lsof Shows a Legal Number of Open Files
Problems Installing Java Ee Sdk on Linux
Wireless API for Linux in C or Java
Best Way to Daemonize Java Application on Linux
How to Solve the 'Lock Obtain Timed Out' When Using Solr Plainly
"Java.Sql.Sqlexception: I/O Error: Connection Reset" in Linux Server
Seeing Too Many Lsof Can't Identify Protocol
What Determines the Current Working Directory of Tomcat Java Process
Itext Get Field Coordinates from Existing PDF
Exception in Thread "Main" Java.Lang.Noclassdeffounderror: Org/Apache/Hadoop/Util/Platformname
Ioexception: Too Many Open Files
Using Visualvm to Connect to a Remote Jstatd Instance Through a Firewall