lineofflight / peddler

Amazon Selling Partner API (SP-API) in Ruby
https://lineofflight.github.io/peddler/
MIT License
307 stars 130 forks source link

Excon errors #24

Closed sqlninja closed 10 years ago

sqlninja commented 10 years ago

Hakan, We have started using peddler recently to loop thru our orders to get both order and customer info. We have been playing with the cycle time in order to not bump up against AMS’s throttle limit, and thus far a cycle of one request every 60 seconds has yielded the “most” results. Although after running for approx. two hours it finally error-ed out with the following: Excon::Errors::ServiceUnavailable: Expected(200) <=> Actual(503 Service Unavailable)

And now when ran (even with a cycle of 75 seconds) it is error-ing with: Excon::Errors::SocketError: getaddrinfo: nodename nor servname provided, or not known (SocketError)

After googling this seems to be related to either AMS or the fog gem, since I don’t see the fog gem in your code I am assuming it’s just AMS…

Do you have any insight on either the error and/or the best way to loop thru orders (or just AMS info in general)

hakanensari commented 10 years ago

Yes, the 503 is Amazon complaining you have sent too many requests, and you're doing the right thing by backing off.

The SocketError, on the other hand, sounds like a temporary local failure. It seems your server is having trouble resolving a domain name. If the issue persists, try an alternative name server in your resolv.conf to troubleshoot.