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
posta un anno fa231 visualizzazioni
1 Risposta
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.

con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande