Merge "Raise connection pool for boto3 in s3 upload role"
This commit is contained in:
@@ -38,6 +38,7 @@ import sys
|
||||
import threading
|
||||
|
||||
import boto3
|
||||
import botocore
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
try:
|
||||
@@ -113,7 +114,13 @@ class Uploader():
|
||||
self.url = os.path.join(return_endpoint,
|
||||
self.prefix)
|
||||
|
||||
# The default for max_pool_connections is 10, which is easily
|
||||
# exhausted if the upload threads overwhelm them.
|
||||
client_config = botocore.config.Config(
|
||||
max_pool_connections=MAX_UPLOAD_THREADS * 4)
|
||||
|
||||
self.s3 = boto3.resource('s3',
|
||||
config=client_config,
|
||||
endpoint_url=self.endpoint,
|
||||
**credential_args)
|
||||
self.bucket = self.s3.Bucket(bucket)
|
||||
|
Reference in New Issue
Block a user