How to fix net::ERR_CONNECTION_RESET issue while uploading files to S3 using multipart upload and presigned url

0

I am trying to implement a feature in my application to support large file uploads. For this, I am utilizing Multipart upload and Pre-Signed URL features provided by AWS to push files to S3 bucket. While I am done with the implementation I came across the issue where there is connection reset (net::ERR_CONNECTION_RESET) error occurs when I am trying to upload files. Do I need to be aware of any configuration on AWS to fix this ? or is it unrelated to AWS ? Any help/suggestions are really appreciated. Thanks :)

Enter image description here

Tharun
asked a month ago444 views
2 Answers
2

Tharun,

When encountering net::ERR_CONNECTION_RESET with S3 multipart uploads, ensure your internet connection is stable and check that the file size doesn’t exceed S3’s limits. Also, consider extending the timeout settings in your application or AWS SDK to accommodate larger files, and verify that your S3 bucket policies don’t impose conflicting restrictions.

Enabling server access logging on S3 may provide additional insight into the requests and potential issues.

profile picture
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Hi Vitor, Thanks for the response. Added screenshot of the network calls that are failing for your reference. I am currently working in local environment and the chunk size(5MB) is within the S3 limit. I'm not sure if it has anything to do with timeout since it is a local environment. I will try enabling logs on S3 to see if I can find anything helpful.

    Any suggestions to ensure that file upload is successful even after the errors(like retry uploading the chunk incase of error etc) so that the user experience will be good ?

0

Hello,

There seems to be an error while uploading files using mulipart uploads. The problem could be that your pre-signed URL is expiring before the upload is complete. Try removing the expire metadata from parameters or increasing the value. By default, a pre-signed URL expires in 15 minutes.

profile picture
Julian
answered a month ago
  • Hey Julian, Thanks for the input. I have expiry time set as 60 mins to ensure that the issue is not with the expiry time of pre-signed URL. And I'm trying to push file chunk immediately after generating the URL. I'm just trying to figure if its the issue with Browser/Network/AWS. Adding a screenshot of the network calls to the post for your reference.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions