Why Is My AWS EC2 t3.medium Instance Hanging for 60 Seconds Before Responding?

0
0
Asked By CloudJumper829 On

Hey everyone, I'm dealing with a frustrating issue on my AWS EC2 instance that seems to hang for about 60 seconds before it finally responds, except when I'm using Safari. Here are some details: I'm running a t3.medium instance with Ubuntu 24.04 and Apache 2.4.58. I'm kind of new to AWS, so I might not know everything I should look for. Whenever I access my server files, there's generally this delay of roughly 60 seconds. After that initial wait, the access speeds up for a bit but the problem comes back later. I've tried using different browsers and connections, but the delay persists, even when I use curl in the AWS console. The strange part is that it works fine in Safari, which is unusual for me. I suspect this issue started after I downgraded my instance from a t2.large (8GB RAM) to a t3.medium (4GB RAM). The AWS monitoring tools don't show any issues, and my RAM usage is around 1GB out of the 4GB available. Any advice or insights would be greatly appreciated!

3 Answers

Answered By CodeWizard91 On

What exactly are you running? Having only 2 vCPUs could mean your server might struggle to handle multiple requests at once, especially if your script is resource-intensive. It could affect speed too.

CloudJumper829 -

I’m using Moodle, and it ran fine on the t2.large, so I'm hoping going back will fix it.

Answered By WebDevGuru77 On

Could you clarify what you mean by 'access files' on your server? Are you using Apache or something else to serve your content? Also, the fact that it only happens outside of Safari is interesting. You might want to watch your CPU usage during these delays, as it could indicate server-side issues. Can you share more about your web server setup, including where your files are stored?

CloudJumper829 -

Yes, I'm using Apache 2.4.58 for a Moodle site and even see the lag when trying to load just the default Apache page. I haven't had issues when uploading files via FileZilla, though. I need to learn more about EBS and GP2; apparently, both t2 and t3 use EBS storage.

Answered By TechSavvyNerd42 On

It sounds like that delay might be linked to DNS resolution issues, especially since it started happening when you downgraded your instance size. T3 instances are burstable, so if you’re running low on CPU credits, that could definitely cause delays. A good test would be to switch back to the t2.large and see if the hanging stops. If your experience is significantly better, then you might have found your answer. Also, the default EC2 monitoring doesn't dig deep into memory usage, so consider configuring a CloudWatch agent if you need that detail. Just something to keep in mind!

CloudJumper829 -

Thanks for your help! I’ll switch back and see what happens. It's just so odd that it works in Safari but not in any other browser. I'm used to Safari being the troublesome one, not the other way around.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.