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
已提問 2 個月前檢視次數 501 次
2 個答案
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
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
  • 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
已回答 2 個月前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南