Closed chicks closed 13 years ago
(Link is dead.)
FYI, I've been having timeout issues when working with the API, even when using the SOAP API (i.e. without the gem). I suspect it's due to the server in my case, but figured I'd mention it here.
If I connect to Sugar via the web interface, while the gem is returning TimeoutError
s, it responds and I can work with it.
Also, interestingly, when I'm iterating over records (e.g. retrieving slices of 50 contacts at a time with a retry
in the rescue block), the TimeoutError
is quite regular (e.g. 4 timeouts, then a successful connection with 50 contacts returned, 4 timeouts again, etc.).
With SOAP are you using ruby net/http?
Try this link: http://userprimary.net/posts/2008/04/13/setting-a-longer-timeout-for-nethttp-requests-in-ruby/
And this one: http://headius.blogspot.com/2008/02/rubys-threadraise-threadkill-timeoutrb.html
That is exactly the error I'm getting, although not consistently: when there is an issue that's the error I get, but whether I get the error or not is seemingly random...
When I'm querying record slices, and I start getting the error it tends to stick around on subsequent calls, though.
When I used SOAP, I simply required soap/wsdlDriver
(built-in up to v. 1.8.7). Note: it could be I was simply trying to query too many records at once. (Happened a while ago, can't recall the specifics...)
I've been chasing some random timeout issues with the gem, and I think some of them might be related to issues with ruby 1.8's timeout implementation. The basic gist is here: http://blog.headius.com/2008/02/rubys-threadraise-threadkill-timeoutrb.html
The Excon gem looks promising, since it's what Fog uses and it supports persistant connections.