|
| 1 | +# Detailed Error Explanations |
| 2 | + |
| 3 | +This page collects detailed explanations for some errors. If you encounter an |
| 4 | +error and are interested in learning more about what it means and why it occurs, |
| 5 | +check here. |
| 6 | + |
| 7 | +**If you can't find the explanation on this page, please file an issue asking |
| 8 | +for it to be added.** |
| 9 | + |
| 10 | +## "Connection encountered an issue and should not be re-used. Marking it for closure" |
| 11 | + |
| 12 | +The SDK clients each maintain their own connection pool (_except when they share |
| 13 | +an `HttpClient`_). By the convention of some services, when a request fails due |
| 14 | +to a [transient error](#transient-errors), that connection should not be re-used |
| 15 | +for a retry. Instead, it should be dropped and a new connection created instead. |
| 16 | +This prevents clients from repeatedly sending requests over a failed connection. |
| 17 | + |
| 18 | +This feature is referred to as "connection poisoning" internally. |
| 19 | + |
| 20 | +## Transient Errors |
| 21 | + |
| 22 | +When requests to a service time out, or when a service responds with a 500, 502, |
| 23 | +503, or 504 error, it's considered a 'transient error'. Transient errors are |
| 24 | +often resolved by making another request. |
| 25 | + |
| 26 | +When retrying transient errors, the SDKs may avoid re-using connections to |
| 27 | +overloaded or otherwise unavailable service endpoints, choosing instead to |
| 28 | +establish a new connection. This behavior is referred to internally as |
| 29 | +"connection poisoning" and is configurable. |
| 30 | + |
| 31 | +To configure this behavior, set the [reconnect_mode][reconnect-mode] in an SDK |
| 32 | +client config's [RetryConfig]. |
| 33 | + |
| 34 | +[file an issue]: https://github.com/smithy-lang/smithy-rs/issues/new?assignees=&labels=&projects=&template=blank_issue.md |
| 35 | +[RetryConfig]: https://docs.rs/aws-types/latest/aws_types/sdk_config/struct.RetryConfig.html |
| 36 | +[reconnect-mode]: https://docs.rs/aws-types/latest/aws_types/sdk_config/struct.RetryConfig.html#method.with_reconnect_mode |
0 commit comments