Skip to content

chore: retry CURLE_SSL_CONNECT_ERROR failures - #2972

Closed
annuh wants to merge 2 commits into
aws:masterfrom
annuh:retry-more-curl-errors
Closed

chore: retry CURLE_SSL_CONNECT_ERROR failures#2972
annuh wants to merge 2 commits into
aws:masterfrom
annuh:retry-more-curl-errors

Conversation

@annuh

@annuh annuh commented Jul 30, 2024

Copy link
Copy Markdown
Contributor

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 #1546.

@annuh
annuh marked this pull request as ready for review July 30, 2024 13:00
@annuh

annuh commented Nov 7, 2024

Copy link
Copy Markdown
Contributor Author

@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!

@stobrien89

Copy link
Copy Markdown
Member

Hi @annuh,

Really sorry for the extreme delay here. We've done some work on retries lately and I would be open to having this as an opt-in only: SSL connect should not be retried by default because it typically indicates a permanent configuration or handshake failure rather than a temporary network glitch.

We are switching to Retry\V3\RetryMiddleware as our new default soon- this middleware accepts $options['curl_errors'] for customizing the retry behavior. This middleware supports standard and adaptive modes only, so if you're looking to use this with the legacy RetryMiddleware, we would need to add a similar mechanism there. Closing for now since we have a workaround, but happy to reopen if you want to rework this or have any questions.

@stobrien89 stobrien89 closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random AWS HTTP error: cURL error 35

2 participants