Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

boto3 s3.download_file is hanging in docker

The download of the file requested by boto3 s3.download_file is hanging. Why is that?

Our build suddenly broke between the 9th and 10th September 2019, but we didn't change anything.

We're using a dockerized environment and we already have some threading going on besides the boto3 s3.download_file.

like image 625
bersling Avatar asked Sep 15 '25 09:09

bersling


1 Answers

The fix for us was to disable threading:

s3.download_file(Bucket=amazon_s3_bucket, Key=amazon_s3_path, Filename=filepath, Config=boto3.s3.transfer.TransferConfig(use_threads=False))
like image 123
bersling Avatar answered Sep 17 '25 21:09

bersling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!