-
Notifications
You must be signed in to change notification settings - Fork 755
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
feat(http-client): retry closed connection errors #1336
feat(http-client): retry closed connection errors #1336
Conversation
Hello @bpinto, Thank you so much submitting this - I am quite excited about this. I will try to have a more detailed look at this next week. |
Hey @richardm-stripe 👋 I'm excited about this change as well! Please let me know what you think we could do differently.
|
e69f78f
to
dea0c78
Compare
Requests that fail with closed connection errors (ECONNRESET, EPIPE) are automatically retried. - `ECONNRESET` (Connection reset by peer): A connection was forcibly closed by a peer.closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or reboot. Commonly encountered via the http and net modules. - `EPIPE` (Broken pipe): A write on a pipe, socket, or FIFO for which there is no process to read the data. Commonly encountered at the net and http layers, indicative that the remote side of the stream being written to has been closed. Fixes: stripe#1040
dea0c78
to
75e10df
Compare
Hi @bpinto, just to keep you updated, we are planning on merging this change in the next major as we're a bit hesitant to change the default retry behavior in a minor. |
Totally understandable, thanks for the follow up. |
* API Updates (#1413) * Bump version to 8.221.0 * API Updates (#1414) * Bump version to 8.222.0 * API Updates (#1415) * feat(http-client): retry closed connection errors (#1336) * feat(http-client): Retry requests that failed with closed connection Requests that fail with closed connection errors (ECONNRESET, EPIPE) are automatically retried. - `ECONNRESET` (Connection reset by peer): A connection was forcibly closed by a peer.closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or reboot. Commonly encountered via the http and net modules. - `EPIPE` (Broken pipe): A write on a pipe, socket, or FIFO for which there is no process to read the data. Commonly encountered at the net and http layers, indicative that the remote side of the stream being written to has been closed. Fixes: #1040 * Remove deprecated orders-related events (#1417) * Bump version to 9.0.0 * API Updates (#1420) * Codegen for openapi 7789931 * Bump version to 9.1.0 * API Updates (#1422) * Codegen for openapi 056745c Co-authored-by: Richard Marmorstein <[email protected]> Co-authored-by: Dominic Charley-Roy <[email protected]> * Bump version to 9.2.0 * Codegen for openapi v146 (#1430) * Bump version to 9.3.0 * Codegen for openapi v147 (#1431) * Bump version to 9.4.0 * docs: Update HttpClient documentation to remove experimental status. (#1432) * Codegen for openapi v149 (#1434) * Bump version to 9.5.0 * API Updates (#1439) * Bump version to 9.6.0 * Update README.md (#1440) * Codegen for openapi v152 (#1441) * Add test for cash balance methods. (#1438) * Bump version to 9.7.0 Co-authored-by: Dominic Charley-Roy <[email protected]> Co-authored-by: Dominic Charley-Roy <[email protected]> Co-authored-by: Richard Marmorstein <[email protected]> Co-authored-by: Bruno Pinto <[email protected]> Co-authored-by: Richard Marmorstein <[email protected]> Co-authored-by: Kamil Pajdzik <[email protected]>
Changes made
Requests that fail with closed connection errors (
ECONNRESET
,EPIPE
) are now automatically retried.ECONNRESET
(Connection reset by peer): A connection was forciblyclosed by a peer.closed by a peer. This normally results from a loss
of the connection on the remote socket due to a timeout or reboot.
Commonly encountered via the http and net modules.
EPIPE
(Broken pipe): A write on a pipe, socket, or FIFO for whichthere is no process to read the data. Commonly encountered at the net
and http layers, indicative that the remote side of the stream being
written to has been closed.
Purpose of changes
Fixes: #1040
See: #1040 (comment)
Depends on #1335
TODO