Communication link failure: 1153 Got a packet bigger than ‘max_allowed_packet’ bytes (SQL: update…

Whilst updating a Trix Editor field box with many images, you get the following error:

[2019-01-18 10:12:07] local.ERROR: SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes (SQL: update...

You might want to look at the application (Laravel) log file to see the actual error because it might be scrolled up the screen with no way to scroll up.

The problem is ‘max_allowed_packet’ MySQL parameter in /etc/my.cnf

This is editable with Webmin:

Navigate to Webmin / Servers / MySQL Database Server / MySQL Server Configuration icon / Maximum packet size = 1 MB changed to 4 MB.

Restarting MySQL from Webmin might be problematic so try it using the command line:

service mysql restart

To check your work, before:

MariaDB [(none)]> show variables like ‘max_allowed_packet’;
+————————–+————+
| Variable_name            | Value      |
+————————–+————+
| max_allowed_packet       | 1048576    |
+————————–+————+

After:

MariaDB [(none)]> show variables like ‘max_allowed_packet’;
+————————–+————+
| Variable_name            | Value      |
+————————–+————+
| max_allowed_packet       | 4194304    |
+————————–+————+

Reference:

https://stackoverflow.com/questions/1493722/mysql-command-for-showing-current-configuration-variables

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top