Repository navigation
Conversation
zoewangg
commented
Nov 6, 2026
| codes.add(2092); | ||
| // AWS_ERROR_HTTP_CONNECTION_MANAGER_ACQUISITION_TIMEOUT | ||
| codes.add(2093); | ||
| // AWS_ERROR_HTTP_CONNECTION_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED |
Contributor
Author
There was a problem hiding this comment.
Removing 2094 from the retryable codes doesn't change behavior for existing users because it was basically unreachable until now. aws-c-http only raises 2094 when max_pending_connection_acquisitions is set, and the SDK never set it (HttpClientConnectionManagerOptions.withMaxPendingConnectionAcquisitions was never called).
The reason we removed it here is to match netty behavior; we don't retry max pending acquisitions error for netty
zoewangg
force-pushed
the
zoewang/crt-max-pending-acquires
branch
2 times, most recently
from
November 18, 2026 17:23
48847cc to
74b91e7
Compare
Cap how many requests per endpoint can wait once maxConcurrency is in use, matching the Netty client option. Unset means unbounded, as today. HTTP/2 needs an aws-crt release that honors the limit. The HTTP/2 over-limit rejection (CrtRuntimeException 2096) is surfaced as is and not retried, like HttpException 2094 on HTTP/1.1.
zoewangg
force-pushed
the
zoewang/crt-max-pending-acquires
branch
from
November 18, 2026 20:49
74b91e7 to
fa8e431
Compare
zoewangg
marked this pull request as ready for review
November 19, 2026 17:02
Fred1155
reviewed
Nov 19, 2026
| // The HTTP/2 stream manager reports its over-limit rejection as a CrtRuntimeException. Surface it as is, so it | ||
| // is not retried, instead of wrapping it in the retryable IOException below. | ||
| if (throwable instanceof CrtRuntimeException | ||
| && ((CrtRuntimeException) throwable).errorCode == CRT_STREAM_MANAGER_MAX_PENDING_ACQUISITIONS_EXCEEDED) { |
Contributor
There was a problem hiding this comment.
Should we consider handle 2094 and 2096 error here with a more clear error message? In netty we have
Contributor
Author
There was a problem hiding this comment.
Good call! Updated
Over-limit requests (2094 on HTTP/1.1, 2096 on HTTP/2) now fail with an IllegalStateException whose message starts with the Netty client's first sentence, with the CRT error as the cause. It is not retried.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
NettyNioAsyncHttpClient.BuilderhasmaxPendingConnectionAcquires, which limits how many requests can wait once all connections (HTTP/1.1) or streams (HTTP/2) are in use. The AWS CRT HTTP clients have no equivalent: waiting requests are unbounded.Modifications
maxPendingConnectionAcquires(Integer)toAwsCrtAsyncHttpClient.BuilderandAwsCrtHttpClient.Builder, which is consistent the Netty option.Testing
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.AI tools
License