Amazon EC2 Instance Continually Loses Connectivity

5

1

I am currently running wordpress on an Amazon ec2 instance, which runs fine with no problems most of the time, but occasionally outside connection to the instance shuts down. I can't access it over either http or ssh, and the server seems completely unresponsive (but the status checks pass). However, everything is fine if I simply stop and start the instance (not restart though). Although this problem is manageable, it is obviously extremely inconvenient and a problem for production. Does anyone know why this might happen? Thanks so much in advance!

cderwin

Posted 2014-09-15T01:23:35.873

Reputation: 163

How do CPU utilization and memory look, in the instance metrics in the console? Is this a micro instance? – Michael - sqlbot – 2014-09-15T03:27:30.050

The metrics all look like I'd expect -- nothing extraordinary when I can connect to the instance, and obviously everything's dead when the connections fail. It's a t2.micro instance. – cderwin – 2014-09-15T04:44:06.647

Well, not quite "obviously" if the status checks are still passing. You're saying all of the Cloudwatch metrics (in the AWS web console) stop updating? – Michael - sqlbot – 2014-09-15T11:08:12.333

No they update, but given that nothing can connect to the server and I had very little running, network in/out, memory write/read, and cpu utilization were all either near 0 or 0. – cderwin – 2014-09-15T17:03:45.083

I experience the same thing and yes it's a t2.micro instance. CPU utilization percent scale is 0 to 1...I assume that's 0% to 100% and if so, I am seeing a sustained +85% CPU before the instance tanks. Then I can no longer SSH to the instance. Have to launch a new one from AMI. – SomethingOn – 2015-03-09T19:38:34.273

Answers

1

Usually this is something you would want to contact AWS support about. Your instance's virtual network adapter could be messed up causing the disconnections, and that's something that only AWS support can handle.

Mousepad

Posted 2014-09-15T01:23:35.873

Reputation: 11

0

It seems that you're running out of CPU credits and your instance freezes:

When an instance starts to run low on CPU Credits, its performance will gradually return to the baseline level (10% to 40% of a single core, as listed in the table above). This deceleration process takes place over the course of a 15 minute interval in order to provide a smooth and pleasant experience for your users.

https://aws.amazon.com/blogs/aws/low-cost-burstable-ec2-instances/

Antoine

Posted 2014-09-15T01:23:35.873

Reputation: 139

Can you please quote the relevant information from the link? – Ramhound – 2016-08-16T17:22:41.727

Is there any way to see my CPU credits on the AWS portal? – Mustafa Hussain – 2018-01-12T07:12:21.243