-
Notifications
You must be signed in to change notification settings - Fork 2.5k
implement expontential backoff and retry for 'HttpError 500 ... Internal Error' #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Backtrace: Attempt 1 failed. HttpError: <HttpError 500 when requesting https://www.googleapis.com/drive/v2/files?q=%270B-PLx8xVPvcDS1N1eFQ5QlYwbVk%27+in+parents+and+trashed%3Dfalse&fields=items%28title%2Cid%29%2CnextPageToken&alt=json&maxResults=1000&pageToken=EAIanwELEgBSlgEKhAEKXPjz6gX_____wxSDokj8DkAA_wH__kNvc21vLnVzZXIoMDAwMDAwY2E5YzRjODRkMlUpLmRpcl9lbnRyeSg4NzAyMDU2NTQyMjZcLjdcLlJFYzdjZGNfTThRKQABEOgHISRTjeXk3XctOQAAAAD6FQwASApQAFoLCSjx1l1vCHwLEAEgATIGCIHrtLAF8ISVfAEMQAAiCwnShEycygAAACAG returned "Internal Error"> Giving up after 2 attempts. HttpError: <HttpError 500 when requesting https://www.googleapis.com/drive/v2/files?q=%270B-PLx8xVPvcDS1N1eFQ5QlYwbVk%27+in+parents+and+trashed%3Dfalse&fields=items%28title%2Cid%29%2CnextPageToken&alt=json&maxResults=1000&pageToken=EAIanwELEgBSlgEKhAEKXPjz6ZL_____wxSCIAvxt4AA_wH__kNvc21vLnVzZXIoMDAwMDAwY2E5YzRjODRkMlUpLmRpcl9lbnRyeSg4NzAyMDU2NTQyMjZcLjdcLlJFUzF1QWR2NkRrKQABENAPISRTjeXk3XctOQAAAABtFgwASBlQAFoLCSjx1l1vCHwLEAEgATIGCLfrtLAF8ISVfAEMQAAiCwnShEycygAAACAG returned "Internal Error"> |
I think that pull request #160 fixed this. |
I'll test eventually. Isn't it about time for a version bump and new release ? |
@lickdragon: I suspect it's long past time. We'll try to get to it soon. |
btw, this also applies to batch calls, it gets slightly more complicated there as I believe and sub-request can throw a 5xx. (update) huh, looks like retry logic is mostly there, just needs support for 5xxs: https://github.com/google/google-api-python-client/blob/master/googleapiclient/http.py#L1430 I'll come up with a patch as we're seeing this on our systems. PR: #486 |
btw I think retry for regular |
ugh, this ALSO applies to oauth, I've seen a 502 on token refresh |
Hello,
I experience HttpError 500 ... Internal Error backtraces when using duplicity.
The backtrace (below) indicates that the exception comes from google-api-python-client .
While duplicity might be able to work around the problem in its code, if possible it would be better to fix the problem in google-api-python-client (so that every api user does not have to make their own implementation).
Nivco (apparently of "Google Developer Relations) on stackoverflow suggested implementing an exponential backoff and retry for HTTP Error 500 for others with the same problem:
http://stackoverflow.com/a/12640475
I see a fork which may be of interest called 'implement exponential backoff and retry for BatchHttpRequest':
jay0lee@60eb5f4
Thanks for considering,
C.
The text was updated successfully, but these errors were encountered: