-
Notifications
You must be signed in to change notification settings - Fork 863
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
DynamoDbAsyncClient - Exception on connection reset #660
Comments
I am seeing this too. I performed a BatchWriteItem with 25 items and got a packet capture via tcpdump. As you can see, the SDK opened 2 TCP connections to send the requests, and AWS eventually closed the connections via a reset packet (which corresponded perfectly with the exception I received). It looks like the SDK tries to keep connections open for later re-use, but there's probably some timeout in AWS to prevent idle persistent connections from hanging around too long on their servers. I see this on my local workstation AND when running in AWS Lambda. Strangely, there were many times where AWS did close the connection via reset, and I didn't get the associated exception, so maybe there is a bug?
|
Thank you for reporting. This has been fixed in #834. Basically, the exception will be retried by the SDK and we should not be letting exceptions get past the end of the pipeline. |
The fix has been released as part of |
…d2fe4fa8 Pull request: release <- staging/128edac6-45eb-43b4-921f-ac7dd2fe4fa8
When using DynamoDBAsyncClient, we intermittently get the following exception, without any resulting problems in our application layer.
Given that we are using the DynamoDbAsyncClient, and this problem has already been reported as an issue for the SQS Client (see #522), the actual problem seems to be in the underlying implementation.
Expected Behavior
This exception should not happen because the connection was reset.
Current Behavior
The exception is there.
Possible Solution
This is just the first idea I had, and I have not looked at layers below AmazonAsyncHttpClient, but given that the exception we get matches what happens in the following scenario
one possibility is that some part of the RequestPipeline completes its execution after the connection has been reset, such as scheduled future execution (AsyncRetryableStage), or async execution of UnwrapResponseContainer / AfterExecutionInterceptorStage)
Steps to Reproduce (for bugs)
Execute enough DynamoDbAsyncClient ::putItem, ::getItem, ::updateItem requests and the problem should surface. It is entirely possible that this has to be done on a system under load, undergoing scaling etc, rather than simply having a simple test setup with one client sending requests.
Context
It's never nice to have exceptions that show up from time to time. Just because they have not been an actual source of problem so far, doesn't mean they won't be in the future. So far, this issue does not actually seem to have an actual impact on our Application, but given its intermittent nature, there is a risk that it would cause infrequent error that are time consuming and hard to track down. Other than that, it's mainly annoying having issues show up in our logs, and we'd rather not filter at this level.
Your Environment
Sdk openjdk:10-jdk-slim2 preview 10
Debian Buster
The text was updated successfully, but these errors were encountered: