WordPress can't access database connection


#1

Used easyengine to setup nginx wordpress php mysql.

Every time I go to sleep at night, the website is fine. I make sure of it. But like 5/10 times when I wake up in the morning and try going to the website, I get a can’t access database connection error. Where would I start looking for answers to resolve this problem? What are the troubleshooting steps?

Thank you,
AJ


#2

@adriano-cortereal

Start with error logs for site.

You can find them in:

/var/www/example.com/logs/error.log

Apart from this, you may run mysqltuner to check if mysql configuration is healthy - http://rtcamp.com/tutorials/mysql/mysqltuner/

If you have traffic, specially spikes, then you may need to add page-cache to site.

There are many reasons and solutions. You can go one-by-one…


#3

Mind taking a look at the log? I took a look but wasn’t really able to identify anything on my own that I would attribute as THE problem.

As I get better at this I will bother you guys less and less :slight_smile:

Log here: https://www.dropbox.com/s/up76mku7bncsaiz/error.log

P.s., in the log file I replaced the real domain with “domain.com” for security reasons.


#4

Based on your error log, I can only suggest you to try a better theme.

The theme you are using seem to have broken functions. Ideally, error log should be empty.


#5