chibenwa opened a new pull request #437:
URL: https://github.com/apache/james-project/pull/437


   Running above 900 req/s on a 3 James setup I encounter the following
   exception:
   
   ```
   software.amazon.awssdk.core.exception.SdkClientException: Unable to execute 
HTTP request: Channel was closed before it could be written to.
     at 
software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:98)
     at 
software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:43)
     at 
software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:198)
     at 
software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:194)
     at 
software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryingExecutor.maybeRetryExecute(AsyncRetryableStage.java:143)
     at 
software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryingExecutor.lambda$attemptExecute$1(AsyncRetryableStage.java:125)
     at 
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
     at 
software.amazon.awssdk.utils.CompletableFutureUtils.lambda$forwardExceptionTo$0(CompletableFutureUtils.java:74)
     at 
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
     at 
software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage.lambda$null$0(MakeAsyncHttpRequestStage.java:104)
     at 
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
     at 
software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage.lambda$executeHttpRequest$3(MakeAsyncHttpRequestStage.java:209)
     at 
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
     at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.io.IOException: Channel was closed before it could be 
written to.
     at 
software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.tryConfigurePipeline(NettyRequestExecutor.java:220)
     at 
software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.makeRequestListener(NettyRequestExecutor.java:168)
     at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
     at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
     at 
io.netty.util.concurrent.DefaultPromise.access$200(DefaultPromise.java:35)
     at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:502)
     at 
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
     at 
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
     at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
     at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
     ... 1 common frames omitted
   ```
   
   Removing pooling yield massive improvements for blob appends. Sending
   emails with setMessages -50% mean time, -33% p99. I could reach
   throughput of 1100+ req/s without exceptions.
   
   S3 client is documentated as thread safe.
   
   ## Performance elements
   
   ### Before, 2000 users, request every 2-4 seconds
   
   ![Screenshot from 2021-05-18 
08-05-14](https://user-images.githubusercontent.com/6928740/118575080-d5428b80-b7af-11eb-87ab-80a9696cec93.png)
   
   
   ### After, 2000 users, request every 2-4 seconds
   
   ![Screenshot from 2021-05-18 
08-04-34](https://user-images.githubusercontent.com/6928740/118574992-bb08ad80-b7af-11eb-95a2-fcf9d6a06794.png)
   
   ### After, 2500 users, request every 2-4 seconds
   
   ![Screenshot from 2021-05-18 
08-03-43](https://user-images.githubusercontent.com/6928740/118574908-a5938380-b7af-11eb-8194-226017693df6.png)
   
   Follow up work: explore different values for 
`objectstorage.s3.http.concurrency`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to