How can I set s3 connection to keep alive?
See original GitHub issueI wanna uploading lots of files to s3 service every time. I made 10 workers to upload files using thread. But a message, “Resetting dropped connection”, is shown repeatedly. I guess s3 connection is newly opened per one time. How can I set connection to keep alive?
import threading
import boto3
s3 = boto3.resource('s3')
class Worker(threading.Thread):
...
def run(self):
s3.Object(bucket, key).put(Body=body)
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to enable Keep Alive connection in AWS S3 or CloudFront?
Keep -alive connections are the norm -- they allow the browser to send the next request without the overhead of a new TCP...
Read more >How to set Keep-Alive to the Header to request to S3? #829
Hi @skyleelove, by default the SDK will use connection pooling and keep alive for all requests made to S3. These connections may be...
Read more >HTTP keep-alive is on by default in modular AWS SDK for ...
In v3, we keep the Node.js HTTP connections alive by default. ... In AWS SDK for JavaScript v2, the keepAlive option was not...
Read more >S3 idle connection timeout | AWS re:Post
You can't control the connection timeout; but you might be able to keep the connection alive by sending TCP keepalives or other requests...
Read more >Why does Amazon recommends reading 'all data' as soon as ...
Therefore looking for some input from the community. Thanks. amazon-s3 · slow-connection · keep-alive · Share.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The session itself isn’t thread safe, you’ll need to create a new one for each thread:
What’s the difference between
and
s3 = boto3.resource('s3')
?