Comments (4)
We have indefinite retries configured for failures and after a while we started to see RejectedExecutionException
By "indefinite retries" do you mean infinite retries?
If so, the behavior you are seeing might be a consequence of setting infinite retries. Depending on the exception received in the retry attempt, the SDK will use the same connection to send the next attempt. If all the 4 connections are stuck on the infinite retry loop, the incoming requests won't have a chance to grab a new connection from the pool because they are all being used.
I'll double-check if this is the case for 503s - if you can provide a stacktrace with the 503 error received from one of the retry attempts, it will be helpful. In the meantime, setting a lower maxRetry should help.
from aws-sdk-java-v2.
It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.
from aws-sdk-java-v2.
We saw similar issue again even after upgrading the SDK to 2.20.86
as mentioned here #3652
Thread dump
"opensearch[de7ba5ba8331cc18de778f4ed0bafb6d][flush][T#52]" #153735 daemon prio=5 os_prio=0 cpu=6527.78ms elapsed=525304.86s tid=0x0000fffe942a01a0 nid=0x5bbb waiting on condition [0x0000fffce1910000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x0000001077da2a98> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:715)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly([email protected]/AbstractQueuedSynchronizer.java:1047)
at java.util.concurrent.CountDownLatch.await([email protected]/CountDownLatch.java:230)
at org.opensearch.index.shard.RemoteStoreRefreshListener.syncSegments(RemoteStoreRefreshListener.java:281)
at org.opensearch.index.shard.RemoteStoreRefreshListener.performAfterRefreshWithPermit(RemoteStoreRefreshListener.java:153)
at org.opensearch.index.shard.ReleasableRetryableRefreshListener.runAfterRefreshWithPermit(ReleasableRetryableRefreshListener.java:160)
- locked <0x00000010414ddeb0> (a org.opensearch.index.shard.RemoteStoreRefreshListener)
at org.opensearch.index.shard.ReleasableRetryableRefreshListener.afterRefresh(ReleasableRetryableRefreshListener.java:66)
at org.apache.lucene.search.ReferenceManager.notifyRefreshListenersRefreshed(ReferenceManager.java:275)
at org.apache.lucene.search.ReferenceManager.doMaybeRefresh(ReferenceManager.java:182)
at org.apache.lucene.search.ReferenceManager.maybeRefreshBlocking(ReferenceManager.java:240)
at org.opensearch.index.engine.InternalEngine.refresh(InternalEngine.java:1860)
at org.opensearch.index.engine.InternalEngine.flush(InternalEngine.java:1975)
at org.opensearch.index.shard.IndexShard.flush(IndexShard.java:1546)
at org.opensearch.index.shard.IndexShard$8.doRun(IndexShard.java:4459)
at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:917)
at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:635)
at java.lang.Thread.run([email protected]/Thread.java:840)
Logs
2024-05-07T10:20:33,473][WARN ][o.o.i.s.RemoteStoreRefreshListener] [de7ba5ba8331cc18de778f4ed0bafb6d] Exception: [software.amazon.awssdk.core.exception.SdkClientException: Failed to send multipart upload requests.] while uploading segment files
software.amazon.awssdk.core.exception.SdkClientException: Failed to send multipart upload requests.
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111)
at software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:47)
at org.opensearch.repositories.s3.async.AsyncTransferManager.handleException(AsyncTransferManager.java:292)
at org.opensearch.repositories.s3.async.AsyncTransferManager.lambda$handleExceptionOrResponse$14(AsyncTransferManager.java:239)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallMetricCollectionStage.lambda$execute$0(AsyncApiCallMetricCollectionStage.java:56)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallTimeoutTrackingStage.lambda$execute$2(AsyncApiCallTimeoutTrackingStage.java:69)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryingExecutor.lambda$attemptExecute$1(AsyncRetryableStage.java:177)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage.lambda$null$0(MakeAsyncHttpRequestStage.java:105)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage.completeResponseFuture(MakeAsyncHttpRequestStage.java:238)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage.lambda$executeHttpRequest$3(MakeAsyncHttpRequestStage.java:163)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:858)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@1081472[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@1d4bcc[Wrapped task = software.amazon.awssdk.core.internal.http.timers.AsyncTimeoutTask@b1e4c3]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@f47160[Shutting down, pool size = 5, active threads = 0, queued tasks = 8, completed tasks = 4565]
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:111)
at software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:47)
at software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:223)
at software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:218)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryingExecutor.maybeRetryExecute(AsyncRetryableStage.java:182)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.execute(AsyncExecutionFailureExceptionReportingStage.java:41)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.execute(AsyncExecutionFailureExceptionReportingStage.java:29)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallTimeoutTrackingStage.execute(AsyncApiCallTimeoutTrackingStage.java:64)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallTimeoutTrackingStage.execute(AsyncApiCallTimeoutTrackingStage.java:36)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallMetricCollectionStage.execute(AsyncApiCallMetricCollectionStage.java:47)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncApiCallMetricCollectionStage.execute(AsyncApiCallMetricCollectionStage.java:31)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.AmazonAsyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonAsyncHttpClient.java:185)
at software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler.invoke(BaseAsyncClientHandler.java:285)
at software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler.doExecute(BaseAsyncClientHandler.java:227)
at software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler.lambda$execute$1(BaseAsyncClientHandler.java:82)
at software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler.measureApiCallSuccess(BaseAsyncClientHandler.java:291)
at software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler.execute(BaseAsyncClientHandler.java:75)
at software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler.execute(AwsAsyncClientHandler.java:52)
at software.amazon.awssdk.services.s3.DefaultS3AsyncClient.completeMultipartUpload(DefaultS3AsyncClient.java:683)
at org.opensearch.repositories.s3.async.AsyncTransferManager.lambda$completeMultipartUpload$18(AsyncTransferManager.java:266)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at org.opensearch.repositories.s3.SocketAccess.doPrivileged(SocketAccess.java:55)
at org.opensearch.repositories.s3.async.AsyncTransferManager.completeMultipartUpload(AsyncTransferManager.java:266)
at org.opensearch.repositories.s3.async.AsyncTransferManager.lambda$doUploadInParts$10(AsyncTransferManager.java:205)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
... 31 more
the stacktrace mentioned above is something that got logged just before the thread got stuck waiting for callback. but since it got logged by our application the CompletableFuture was completed by sdk.
post this there was some error in sdk which lead to the CompletableFuture during next retry to never complete. The stracktrace for it was never logged by sdk(dont have debug logs enabled).
I am trying to repro this at our end as well with debug logs enabled for sdk. Any help would be much appreciated!
from aws-sdk-java-v2.
@debora-ito can we reopen the issue ?
from aws-sdk-java-v2.
Related Issues (20)
- Cognito: support for partial UpdateUserPoolClient calls HOT 1
- finalizeMultipartUpload is throwing 404 error HOT 3
- SDK Clients are `Closeable` and documented as thread safe but don't provide an `isClosed()` method HOT 1
- S3Async client fail to upload files (Service: S3, Status Code: 400, Request ID: null) HOT 1
- Getting occasional Crc32MismatchException using DynamoDbClient HOT 5
- Thread locals are lost after the control is returned from SDK methods to the client code HOT 1
- Parse QueryParams when building S3Uri from AWS CLI Style format HOT 3
- InstanceProfileCredentialsProvider unable to refresh/recover from network problems at time of credential cache refresh HOT 2
- Stuck on `java.util.concurrent.Future#get(long, java.util.concurrent.TimeUnit)` when using `java.util.concurrent.Executors#newVirtualThreadPerTaskExecutor` HOT 2
- Equivalent of `com.amazonaws.util.json.Jackson` in sdk v2 HOT 5
- Regression between SDK v1 and v2 around client side encryption HOT 2
- Version 2.25.26 Could not parse POM HOT 1
- S3 Transfer Manager created using S3Aysnc Client with CRT Builder holding significant memory even after downloads are completed
- Setting metadata and retention with UploadDirectoryRequest
- Don't download 200MB of JS for a JavaDoc search feature that most people don't use HOT 1
- Unshaded dependencies in AWS SDK HOT 9
- S3 Presign Head method HOT 2
- S3 CRT Client GetObject Request with Invalid Range crashes JVM with SIGSEGV HOT 1
- ApiName does not implement equals HOT 2
- assumeRoleWithWebIdentity doesn't work from java API but does work from the cli interface HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-java-v2.