function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
java devjava dev 

How to detect "connectin reset" exception & how to get rid of this

Hi all,

    I have to write one application which will query salesforce data for every 5 mins & put that data in my local Databse.

But in the process os querying , some times i am getting "Connection reset " exception.

1) How to detect this exception?
2) How to avoid getting this exception?

After transferring some data to my target Db, some intermediate query is giving me this exception. So, my subsequent queries are failing.
As a result , my target Db is in inetrmediate state.I am using JDBC to connect to my target Db.

3)How to maintain consistancy for my target Db?

Please any body help me.

Thank you,
Sudheer Tumu.

This is not an easy one. It's not your fault and you can't prevent connection resets, unless it's simply a case of exceeding your timeout limit. connections go down for any and all reasons. The exceptions are not classed in ways that would let you differentiate error conditions at the record level vs. a collection of records vs. internal errors vs. your internet connection going down.

We have spent three years refining the retry-restart logic in Relational Junction so that we can gaurantee delivery of all data, not create duplicates, auto-connect for up to 20 minutes, auto-retry all failures, and restart as close as possible to the point of failure. There are lessons in this that expose the myth of how easy it is to develop a home-grown solution, despite the excellent quality of the API functionality and documentation. The devil's in the details. Our major sales competition is the do-it-yourselfers who don't realize the complexity of proper error handling; anybody can write code that assumes everything's all right.

If you would like to talk to me directly, send an email to with your phone and a good time to talk.
for the specific connection reset's, please log a case with us to troubleshoot

We are have similar issues on a fresh connection. We connect to Salesforce and try to retrieve data(using query and queryMore methods on the Stub) from the tables. We randomly keep getting the "Connection Reset" error.

1. Are there any alternatives to avoid this exception?

2. Does anyone know how to not use persistent connections to Salesforce ? Would this help not getting this error?

If someone has some suggestions please let me know.




Hi Benji,

we are also facing this issue.

can anyone provide us the work-around to resovle this issue ASAP, logging a case to troubleshoot will take time.

Appreciate your help.




Message Edited by Ashu on 02-10-2008 12:11 PM
Sivakumar MangatiSivakumar Mangati
I'm facing same issue from last 2 weeks from PI frequently. Could anyone help me to find a solution for the "Connection Reset" problem.