MySQL Server has gone away

Hello! I have a some basic websites, on a VPS with Hestia Panel installed (PHP, MySQL, PHP-FPM, Apache). I am using the default plan package.

From time to time the websites (which are simple - a few simple database queries) are loading slow and MySQL stops the execution of the PHP file, showing: “MySQL Server has gone away.” error. In the rest of time, the websites are loading almost instantly.

What could be the problem? This looks like a timeout on MySQL which stops the execution. That would not be a problem for me if there is a timeout. But how to identify the reason why the php scripts are loading slow? Could it be a problem regarding PHP-FPM? What should I do?

I am new on Hestia. Untill now, I used to manually configure and install the server, but now I need a panel to make use of more features.

Thank you very much!

About the “Gone away” message, maybe you would like to check this thread How to fix mysql has gone away


I remember got this case, hehehe…

i do this

1 Like

Thank you! Just changed it. Hope will work. Thanks again!

i had the same problem. my mysql always stopped working after a few days or a week. the solution was that i gave the mysql more ram.

in /etc/mysql/my.cnf

depending on how much ram your vps has you can give 60-70% to mysql.

1 Like

Nice idea