Magento 1.9.1

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] [2002] Connection refused

SQLSTATE[HY000] [2002] 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?

  • Additional information request. Post on pastebin.com and share the links. RAM size of your MySQL Host server A) complete (not edited) my.cnf or my.ini Text results of: AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, df -h for a linux/unix free space list by device, includes hda & sda (SSD) filesystem type clues. free -h for a linux/unix Total Used Free Mem: and Swap:, for server tuning analysis. – Wilson Hauck Feb 27 at 22:04
  • With this information, we can likely suggest my.cnf changes to help you avoid the problem. – Wilson Hauck Mar 1 at 22:49
  • Are you still broken? – Wilson Hauck Mar 8 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.