Matmo (Piwik) went down

Hello Team,

We have Matomo which is running on 3.12.0 version. we have upgraded feb 2020. From that time onwards no issues. But today suddenly application was not able to access. It was keep on loading for long period of time, finally got 504 error. We tried to login node instance of that server, it’s not allowed to login. Finally we restarted server, then started service. We verified all the metrics related to instance & RDS as well. It looks CPU utilization, n/w in & out are high. But tried to investigate deep from logs we found that there are some errors related to MySQL memory related which i am sharing below.

Error : 20] [php7:notice] [pid 4727] [client] Error in Matomo (tracker): SQLSTATE[HY000] [2006] MySQL server has gone away,
[Wed Sep 09 07:07:27.024772 2020] [php7:notice] [pid 4229] [client] Error in Matomo: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away - in plugin Goals.

As per that error we veified some official documents which says that we need to increase max_allocated_package to 512 MB. But in our case it’s already increased to 1024 MB. But still why we got that issue we are not sure.
So please help us to find out root cause & solution for this, so that it will improve application performance.
Doc :

Thanks & Regards

Hi Revathi,
Once you’ve made these changes in the FAQ, and restarted your MySQL or MariaDB server, the issue should be fixed and no more error triggered. If not, try increase the 128M values to 256M for example. In websites with a lot of traffic and data, you might even need to increase the value to 1024M . (added this to the FAQ just now)