We just got migrated to a different node because we had performance problems on the old node (within the same hosting company) and ever since then, none of our Magento stores even load.
When trying to load the front pages - the following Errors come up:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query was: INSERT INTO `mg_log_visitor` (`session_id`, `first_visit_at`, `last_visit_at`, `last_url_id`, `store_id`) VALUES (?, ?, ?, ?, ?) SQLSTATE[HY000]  Connection refused SQLSTATE[HY000]  No such file or directory
I think this always happened to us after this hosting company migrated us to a different 'node'. It must be some kind of a configuration issue?
Here are the most current entries in the system.log file:
2019-02-21T10:49:40+00:00 ERR (3): Warning: PDOStatement::execute(): MySQL server has gone away in /home/oursite/public_html/includes/src/__default.php on line 65404 2019-02-21T10:49:40+00:00 ERR (3): Warning: PDOStatement::execute(): Error reading result set's header in /home/oursite/public_html/includes/src/__default.php on line 65404 2019-02-21T10:49:40+00:00 ERR (3): Warning: PDO::__construct(): MySQL server has gone away in /home/oursite/public_html/includes/src/__default.php on line 55207 2019-02-21T10:49:40+00:00 ERR (3): Warning: PDO::__construct(): Error while reading greeting packet. PID=15481 in /home/outsite/public_html/includes/src/__default.php on line 55207
The hosting company is trying to blame this on Magento but I know it's some kind of a mis-configuration after the migration (we were running successfully without problems for years).
This is a reply from our hosting company:
The main issue - server reaches memory usage limit. Here is summary Dabase size root@new [/]# du -sh /var/lib/mysql/ 7.1G /var/lib/mysql/ And memory usage: root@new [/]# free -m total used free shared buffers cached Mem: 6144 6144 0 6723 0 526 -/+ buffers/cache: 5617 526 Swap: 0 0 0
Server have only 400MB free which abnormal for stable work. I'll recommend reducing the database size and disable any kind of statistics / debugging to avoid mysql overload, or increase RAM twice. Also as I see your server have nginx on board, but for some reason nginx service is inactive, any reason why it's disabled? We can help with nginx optimization because I recommend use web servers like nginx / litespeed on highload servers.
How do I disable statistics/debugging?
Anything else I can do to bring the site back up?