WordPress can't access database connection

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

@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…

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.

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.