Suddenly occurring 'Error establishing a database connection' to EC2 instance

0

Hi folks,

I'm working on a wordpress website that runs on AWS EC2 instance. Sometimes, my mysql server is goes down and it shows 'Error establishing a database connection' for a second and when I refresh the page again then it's get rid.

It shows that I've wrong entry of the database name, database user, port and host in wp-confg.php. But there is all okay.

Can you please give me a solutions regarding this?

I've checked ton's of articles from AWS re:post and also google. But can't figure out what's wrong actually.

Thanks.

profile picture
Saif
asked a year ago306 views
1 Answer
0

It's not wp-confg.php. MySql db on ec2 or rds? See MySQL logs or CloudWatch. May be DB server overloaded.

answered a year 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