[Junie]: Junie Getting SdkClientException (Unable to execute HTTP request: Timeout waiting for connection from pool)' after several days of running the application #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌 Hey! This PR was made for you with Junie, the coding agent by JetBrains Early Access Preview
It's still learning, developing, and might make mistakes. Please make sure you review the changes before you accept them.
We’d love your feedback — join our Discord to share bugs, ideas: here.
📝 Original Issue Description
Describe the issue
Upcoming End-of-Support
I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.
Describe the bug
We are using AWS SDK for interacting with AWS DynamoDB.
Using com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTableMapper class and .save(entity) method to save objects to DynamoDB.
The application runs fine for several days, and then suddenly starts throwing below exceptions
exception: 'SdkClientException (Unable to execute HTTP request: Timeout waiting for connection from pool)' that was caused by: org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:316)
The only way to get rid of it is by restarting the application.
SDK version: 1.12.777
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
The expectation is to not throw the SDKClientException
Current Behavior
exception: 'SdkClientException (Unable to execute HTTP request: Timeout waiting for connection from pool)' that was caused by: org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:316)
Reproduction Steps
Using the provided methods in DynamoDBTableMapper class to save, delete, query
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
1.12.777
JDK version used
openjdk version "21.0.1" 2023-10-17 LTS
Operating System and version
AWS ECS Fargate 1.4.0
Links
please
📊 Junie Summary
A connection pool monitor was implemented in the AWS SDK for Java to prevent connection pool exhaustion and resolve
SdkClientExceptionerrors. The enhancements include periodic management of idle connections, and the implementation is functioning error-free.