aws / aws-sdk-php

Official repository of the AWS SDK for PHP (@awsforphp)
http://aws.amazon.com/sdkforphp
Apache License 2.0
6.04k stars 1.23k forks source link

chore: retry CURLE_SSL_CONNECT_ERROR failures #2972

Open annuh opened 4 months ago

annuh commented 4 months ago

This PR enables retries of the CURLE_SSL_CONNECT_ERROR failure.

Our application randomly encounters these errors:

AWS HTTP error: cURL error 35: Send failure: Connection reset by peer (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

After a retry, it works. Since this failure should be safe to retry, I think it's a good idea to make the AWS SDK automatically retry this failure using the existing logic.

This could also fix https://github.com/aws/aws-sdk-php/issues/1546.

annuh commented 3 weeks ago

@stobrien89 this PR is open for quite some time. I understand this isn't an urgent issue, but our application still encounters this problem, from time to time. Could you maybe take a look at this PR someday? 🙂 Thanks in advance!