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 172.16.86.0:54498] Error in Matomo (tracker): SQLSTATE[HY000]  MySQL server has gone away,
[Wed Sep 09 07:07:27.024772 2020] [php7:notice] [pid 4229] [client 172.16.64.33:19116] 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 : https://matomo.org/faq/troubleshooting/faq_183/
Thanks & Regards