

In some cases, running a well crafted UPDATE statement in production can save the day. You may be interested to learn more about Matomo Analytics to measure your websites and apps and keep control of your analytics data.How to Test Insert and Update Statements before Executing Them by Robert Gravelle If the above changes do not resolve the issue and if you are using MYSQLI adapter in Matomo, try switching to adapter = PDO\MYSQL in your config/ file. In websites with a lot of traffic and data, you might even need to increase the value to 1024M. If not, try increase the 128M values to 256M for example.

Once you’ve made these changes, and restarted your MySQL or MariaDB server, the issue should be fixed and no more error triggered. This can occur when performing an update to the Matomo database that requires DB Schema changes (Especially for large databases). set max_allowed_packet = 128M, then restart your MySQL server: sudo /etc/init.d/mysql restart To fix, you can increase the maximal packet size limit max_allowed_packet in my.cnf file, eg. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection.

To fix, check that wait_timeout mysql variable in your my.cnf configuration file is large enough, eg wait_timeout = 28800
