-
Notifications
You must be signed in to change notification settings - Fork 866
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
CRT HTTP Client: HTTP Connections are not properly released #4815
Comments
Hi @i-volkov thank you for reaching out.
|
Thank you for the resposne.
|
@i-volkov I think I 'm able to reproduce, still need to confirm if it's the same problem you are running into. If I set a low apiCallAtemptTimeout like 20ms, some requests will succeed, but some will fail and will be retried. When using version 2.18.34 (and aws-crt-client 2.18.34-PREVIEW) and calling GetItem in a loop, LeasedConcurrency is 2 at max. Running the same code with version 2.18.35 (and 2.18.35-PREVIEW for aws-crt-client), the LeasedConcurrency jumps to 50. We still need to investigate the root cause. |
@debora-ito
The above sentence from my previous post is incorrect, the right way of phrasing is: the more retries we have the faster LeasedConcurrency metric grows. Sorry for the confusion. |
The issue was occurring because of PR-3603 added in The fix is available in version 2.23.2. I would recommend using the latest version. |
Thank you! We did a quick test using version 2.23.2 and the issue is gone |
@i-volkov thank you for confirming the fix is working. Closing this. |
|
Describe the bug
We are using AwsCrtAsyncHttpClient for DynamoDB API calls.
Everything was working fine, however after we upgraded to the new version of SDK we noticed, that over the time LeasedConcurrency metric value is growing steadily and when it reaches maximum capacity all API requests starting to fail with timeout exception apparently because client is not able to acquire new connections from the pool.
Another observation is that the speed of increase in LeasedConcurrency is correlated to the RetryCount, so it might be that connections from the failed requests are not properly released.
Expected Behavior
All connections are properly released and connection pool always has available connections
Current Behavior
Some connections are not properly released which leads to the lack of available connections
Reproduction Steps
Possible Solution
No response
Additional Information/Context
The last working SDK version is 2.18.34, so theoretically the change which caused the regression should be here:
2.18.34...2.18.35
The issue is reproducible on the latest SDK version 2.22.10.
AWS Java SDK version used
2.18.35
JDK version used
openjdk version "17.0.7" 2023-04-18 LTS OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS)
Operating System and version
Linux 6.1.61-85.141.amzn2023.x86_64
The text was updated successfully, but these errors were encountered: