Hi all! So, my site has been down several times this past few days. I am running a self hosted wordpress site using Umbuntu.

The other day I had an error establishing a database connection so when I run curl -I and tail, I didn’t saw anything particular so when I restarted the apache the site run back normally.

However, today the site was down again and when I run tail it showed that apparently I lost connection to MySql database therefore I did a series of apache and mysql restarting and now my site is back again.

My question is, what normally drives this kind of errors and if ever there is a problem with mysql, how can I fix this? Below are the logs from the latest moment my site was down.

It is down again and when I try curl:

HTTP/1.1 500 Internal Server Error
Date: Sun, 01 Nov 2015 08:36:40 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.11
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=utf-8

And here’s the tail result:

[Sun Nov 01 07:10:58.648191 2015] [:error] [pid 17859] [client 5.8.66.115:47686] WordPress database error Lost connection to MySQL server during query for query select val from wpwfConfig where name=‘disableConfigCaching’ made by include('wp-load.php’), requireonce('wp-config.php’), requireonce('wp-settings.php’), includeonce(’/plugins/wordfence/wordfence.php’), wordfence::install_actions, wfCache::setupCaching, wfConfig::get, wfDB->querySingle

I don’t understand most of the problem which the tail gave me except for the lost server from MySql. I wish to fix this problem and I think restarting it is just something temporary because if there’s something bigger behind this downtime, I really wish to fix now.

This forum has been so helpful and I really enjoy the learning progress everytime I recieve a downtime but recently I’m getting quite a bit of traffic and the down time has been affecting the flow :(

Thanks all!

1 comment
  • I’m receiving some heavy traffic from the IP you’re mentioning here (5.8.66.115) :(
    Cloudflare is helping me out!

    5.8.66.115 - - [02/Nov/2015:16:42:44 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    5.8.66.115 - - [02/Nov/2015:16:42:45 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    5.8.66.115 - - [02/Nov/2015:16:42:46 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    5.8.66.115 - - [02/Nov/2015:16:42:47 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    5.8.66.115 - - [02/Nov/2015:16:42:49 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    5.8.66.115 - - [02/Nov/2015:16:42:49 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    5.8.66.115 - - [02/Nov/2015:16:42:49 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
    

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

Most likely OOM killer, check your syslog.

I’m receiving some heavy traffic from the same IP (5.8.66.115) :(

5.8.66.115 - - [02/Nov/2015:16:42:44 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
5.8.66.115 - - [02/Nov/2015:16:42:45 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
5.8.66.115 - - [02/Nov/2015:16:42:46 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
5.8.66.115 - - [02/Nov/2015:16:42:47 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
5.8.66.115 - - [02/Nov/2015:16:42:49 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
5.8.66.115 - - [02/Nov/2015:16:42:49 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
5.8.66.115 - - [02/Nov/2015:16:42:49 -0500] "POST /xmlrpc.php HTTP/1.0" 404 463 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"

Maybe late answer, but you could try to change the value for php fpm in www.conf.

Change:
pm.maxchildren = 100
pm.start
servers = 20

To:
pm.maxchildren = 10
pm.start
servers = 10

This will avoid php to eat your memory when you got more traffic to the site.

Submit an Answer