This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c9e48c  Turning on tcp keep alive for S3 clients
9c9e48c is described below

commit 9c9e48c962feeb6f17dc3c4246757c349a1a0e2a
Author: DImuthuUpe <[email protected]>
AuthorDate: Thu Mar 16 11:36:50 2023 -0400

    Turning on tcp keep alive for S3 clients
---
 .../src/main/java/org/apache/airavata/mft/transport/s3/S3Util.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3Util.java
 
b/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3Util.java
index ecd178d..9495ec8 100644
--- 
a/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3Util.java
+++ 
b/transport/s3-transport/src/main/java/org/apache/airavata/mft/transport/s3/S3Util.java
@@ -17,6 +17,7 @@
 
 package org.apache.airavata.mft.transport.s3;
 
+import com.amazonaws.ClientConfiguration;
 import com.amazonaws.auth.AWSCredentials;
 import com.amazonaws.auth.AWSStaticCredentialsProvider;
 import com.amazonaws.auth.BasicAWSCredentials;
@@ -93,10 +94,14 @@ public class S3Util {
                     s3Secret.getSessionToken());
         }
 
+        ClientConfiguration clientConfiguration = new ClientConfiguration();
+        clientConfiguration.setUseTcpKeepAlive(true);
+
         AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
                 .withEndpointConfiguration(new 
AwsClientBuilder.EndpointConfiguration(
                         s3Storage.getEndpoint(), s3Storage.getRegion()))
                 .withCredentials(new AWSStaticCredentialsProvider(awsCreds))
+                .withClientConfiguration(clientConfiguration)
                 .disableChunkedEncoding()
                 .build();
 

Reply via email to