Continuously showing "Error establishing database connection"

0

I've a website hosted on AWS EC2 instance (Ubuntu) developed by WordPress. At the beginning of the development, the site was running smooth without any error. But some day's later, it's continuously showing "Error establishing database connection" page on my wordpress website in two minutes in a row.

wp-config.php is completely okay and there is no miss information regarding database connection (username, db name, host and pass).

My developer's are saying that it's showing for heavy traffic and when some users are visiting at same time, the database process is getting high. Is it correct???

Currently my site traffic is only 500 users per day and max 50 traffic at a time. Can someone please help me to solve this ignominious situation?

Thanks.

profile picture
Saif
質問済み 1年前231ビュー
1回答
0

Hi Saif,

This is a common issue with PHP based framework (Stateless DB connection). There are many best prectices shared by AWS to run such workload you can see here

But the simpler solutions would be improve the caching for read only user and there are many easy ways to do that, one of the simple one is to implement plugins like W3 Total Cache.

But if you are planning to serve larger user number I would suggest moving the Database to Aurora, Setup Cloud front and S3 Plugin for static content. The document here explain all the implementation steps needed.

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ