question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

socket.error during s3 upload

See original GitHub issue

This seems to happen intermittently:

    boto_try(s3.meta.client.upload_file, Filename=os.path.join(LOG_DIR, self.out), Bucket=LOG_BUCKET, Key=self.out, ExtraArgs=AUTH_READ)
  File "processor.py", line 65, in boto_try
    return func(**kwargs)
  File "/usr/lib/python2.7/site-packages/boto3/s3/inject.py", line 106, in upload_file
    extra_args=ExtraArgs, callback=Callback)
  File "/usr/lib/python2.7/site-packages/boto3/s3/transfer.py", line 275, in upload_file
    future.result()
  File "/usr/lib/python2.7/site-packages/s3transfer/futures.py", line 73, in result
    return self._coordinator.result()
  File "/usr/lib/python2.7/site-packages/s3transfer/futures.py", line 233, in result
    raise self._exception
socket.error: [Errno 104] Connection reset by peer

I expect this to be caught by boto3 and raise a ClientError.

Note/aside: There’s a discrepancy between python 2 and 3 isinstance(socket.error, OSError) on python 3 but not python 2.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
haydcommented, Nov 19, 2021

still an issue

1reaction
github-actions[bot]commented, Nov 19, 2021

Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Upload to S3 - An operation on a socket could not be ...
I have a website build in C# and MVC4 where users can upload large files which are in turn sent to Amazon S3....
Read more >
Fix A Socket Error Occurred During The Upload Test - TechCult
Method 1: Enable Connected Device Platform Rule · Method 2: Stop Syncing on OneDrive or Google Drive · Method 3: Add Exception in...
Read more >
Error Responses - Amazon Simple Storage Service
Error Code Description HTTP Status Code AccessControlListNotSupported The bucket does not allow ACLs. 400 Bad Request AccessDenied Access Denied 403 Forbidden BucketAlreadyOwnedByYou 409 Conflict (in all...
Read more >
How can I resolve errors I received while uploading data to or ...
Introduction to AWS Services · ETL from AWS S3 bucket to Amazon RDS Aurora PostgreSQL Serverless V2 DB in VPC Using AWS Lambda...
Read more >
Direct File Uploads to S3: Part 2 Discussion - GoRails
I have a socket error when I attempt to save my form with the file upload. I'm trying to use the sydney region...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found