Help Center> Object Storage Service> SDK Reference> Python> FAQs> What Is the Retry Mechanism of SDK?

What Is the Retry Mechanism of SDK?

SDK uses max_retry_count configured in Initializing an Instance of ObsClient to retry. The default number of attempts is 3. A value ranges from 0 to 5 is recommended. If the network connection is abnormal or the server returns the 5XX error when an ObsClient API is called, the SDK performs an exponential backoff retry.

  • When ObsClient.putContent is called for a streaming upload, the SDK does not retry when an I/O exception occurs because the data stream cannot be read back. The upper-layer application needs to retry.
  • When ObsClient.getObject is successfully called and the object that supports the streaming download is returned, the SDK does not retry when an I/O error occurs during data reading from the returned object because this situation is beyond the scope of the processing logic of the SDK. The upper-layer application needs to retry.