How long to re-establish connection

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
JKatzen
User
Posts: 2
Joined: Thu Jun 21, 2012 9:17 am

How long to re-establish connection

Post by JKatzen » Thu Jun 21, 2012 10:52 am

Hello - I have a script I'm running that connects to the Bullhorn API using Python with the suds package. I am trying to get all the open joborders with query and findMultiple methods.

The problem is when I am looping through my script and doing the findMultiples. Everytime midway through the script, the API server will send me a 'connection reset' or timeout at some point. This doesn't seem like it should be a major problem and a lot of the times I am able to re-establish a new connection and continue running the script, however there always seems to be at least one time where it will fail every time I try to re-establish the connection.

I am sleeping the script for 30 seconds after the first exception is sent back from the server before I try to restart. Is this not long enough? It seems to work sometimes, but not all the time (it will fail 10 times in a row or more when this happens - when the the reconnect works, it only fails once or twice at most). I have yet to be able to get through the entire script without it encountering this error. I don't want to keep hammering the server with reconnect requests, so I'm trying to keep the number or iterations down with a 30s delay between each one - also when this happens, no amount of reconnects works.

Please advise?

edit: This is the exact error message ''Could not access HTTP invoker remote service at [http://bhservice5/data-services-2.5/sr/ApiDataService]; nested exception is java.net.SocketException: Connection reset''

MGIORDANO1
User
Posts: 13
Joined: Thu Apr 19, 2012 8:47 am

Re: How long to re-establish connection

Post by MGIORDANO1 » Mon Jun 25, 2012 2:08 pm

Hello

I wanted to see if you are limiting the find multiple operations to 20 IDs at a time. If you do not limit the amount you will see issues like the one you are describing.

Thank you
Matt

JKatzen
User
Posts: 2
Joined: Thu Jun 21, 2012 9:17 am

Re: How long to re-establish connection

Post by JKatzen » Mon Jul 02, 2012 5:34 pm

Yup - I am limiting it to 20. I have a suspicion that it might be the suds library I am using with python that may be the bottleneck.

May report back later if I am still running into issues. Trying to circumvent the issue with programming trickery.

Post Reply