Project

General

Profile

Actions

Idea #7697

closed

[SDKs] Improve socket error handling in PySDK

Added by Brett Smith about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Start date:
10/29/2015
Due date:
Story points:
1.0

Description

History: we added brute-force socket error retry handling in #7587. We want to improve it to use the same rules we're using in the Go SDK in #5538. Modify _intercept_http_request to do the following:

  • If we're about to do a POST or DELETE, and (as far as we know) the http client's socket has been idle for more than 30 seconds, close its socket. (httplib2 will automatically open a new one to make the request.) It might be hard to tell how long the socket has been idle: "we haven't used the http client for 30 seconds, and the socket is idle right now" might be a good enough approximation.
  • Retry BadStatusLine and socket.error the same way as we currently do, but only if the original request was idempotent (i.e., HEAD, GET, or PUT).

Subtasks 2 (0 open2 closed)

Task #7850: Avoid re-using old sockets for non-retryable requestsResolvedTom Clegg10/29/2015Actions
Task #7794: Review 7697-socket-retryResolvedTom Clegg10/29/2015Actions

Related issues 1 (0 open1 closed)

Related to Arvados - Bug #12684: Let user specify a retry strategy on the client object, used for all API callsResolvedBrett Smith05/09/2023Actions
Actions

Also available in: Atom PDF