Skip to content

Urgent: Intermittent File Upload Issues on EC2 Instance (ap-south-1)

0

I am having a recurring issue with file uploads on our EC2 instance (ap-south-1). I have been experiencing intermittent failures when attempting to upload files to our server.

Issue Description:

Upload Failures: Files consistently fail with various error messages, including "socket hang up error," "net::ERR_CONNECTION_RESET," and "CORS error."

Inconsistency: This issue has occurred twice in the past few weeks, despite no apparent changes to our configuration.

Previous Resolution: A temporary fix was achieved by restarting the EC2 instance, but the problem has resurfaced.

If I will restart the EC2 instance and it will start working fine again with file uploading. But the issue will appear again after some time.

Relevant Details:

Instance Type: t2.large

Instance RAM Memory: 8GB

Deployment: Laravel application

Upload Methods: Tried using Postman, Chrome, and Firefox using HTTP request

Error Logs: I have reviewed Nginx and project logs without identifying any specific causes.

Previous Success: I have successfully uploaded files up to 50 MB in the past and it was working fine till last week.

I have attached screenshots of the error messages for your reference.

Enter image description here

Enter image description here

Enter image description here

I kindly request your assistance in diagnosing and resolving this issue. Please advise on potential causes and recommended troubleshooting steps.

Your timely response would be greatly appreciated.

Thank you for your attention to this matter.

Sincerely

asked a year ago141 views
1 Answer
0

Hello,

Since restarting the instance temporarily resolves the issue, it could indicate a resource exhaustion problem (memory leaks, connection exhaustion, etc.). Consider scaling up your instance type or increasing your application's resource limits.

You can do the following :-

Temporarily upgrade your instance type to see if increased resources prevent the issue. Implement the configuration changes in Nginx, Laravel, and monitor the results. Set up alerts in AWS CloudWatch to notify you when certain thresholds (CPU, memory, disk I/O) are reached.

If the issue persists after these steps, consider consulting AWS support for deeper diagnostics specific to your environment.

EXPERT
answered a year ago
EXPERT
reviewed a year ago
  • Previously we had resource exhaustion problem in initial stage of project deployment. We scaled up our instance type and currently using t2.large instance type, with an additional storage of 50GB.

    Current instance type have 8GM RAM and I was suspecting it could be something memory leakage, but the current memory usage is almost than 50 % Here are the latest stats of RAM usage (in MBs)

    total used free shared buff/cache available Mem: 7930 3344 2514 104 2070 4169 Swap: 0 0 0

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.