2 Instances, both running. Websites going down.

0

Why are my websites going down when the instance is still running?

  1. I run two instances. 1 x t3.small 1 x t3a.large
  2. The t3a.large instance hosts two websites. Both of those websites go down at the same time, but the instance remains running.
  3. Re-booting the instance that hosts those two websites brings the websitess back up quickly
  4. The t3.small websites and instance running as normal
  5. When trying to access websites, returns "Error establishing a database connection".

I have increased storage to 32GB recently. I dont think that is the issue or the instance would have stopped (also gets no where near that limit). IMDS v2 has a brown coloured warning "EC2 recommends setting IMDSv2 to required", but the smaller instance also has this, so assume also not the issue. Nothing out of the ordinary showing on the monitoring I run gravity forms on just one of the websites.

asked 10 days ago56 views
2 Answers
0

Hello.

Have you checked the OS system log or web server error log?
Also, are EC2's CPU and memory usage rates high?
I think "Error establishing a database connection" is an error that occurs when the database to which you are connecting is not running or there is some kind of connection problem.
Is the database hosted on RDS or something?

profile picture
EXPERT
answered 10 days ago
profile picture
EXPERT
reviewed 10 days ago
0

I have increased storage to 32GB recently.

This just increases disk, and not memory. And you would still need to extend the filesystem https://docs.aws.amazon.com/ebs/latest/userguide/recognize-expanded-volume-linux.html (I know the URL has linux in it, but it gives you the method for Windows as well).

From what you describe, both websites going down at the same time suggests either a problem with the webserver (is it IIS?) or it could be a resource exhaustion issue (which is my hunch). It would be worthwhile setting up CloudWatch agent to collect more detailed system logs and this may show that your root cause is exhaustion of some system resources.

See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-commandline-fleet.html#download-CloudWatch-Agent-on-EC2-Instance-commandline-fleet (a bit Linux-centric but the download link is in the table) and https://repost.aws/knowledge-center/cloudwatch-push-metrics-unified-agent

profile picture
EXPERT
Steve_M
answered 10 days ago

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