SSH into the Synology Server.


Open the file:  

/volume1/@appstore/MariaDB10/usr/local/mariadb10/etc/my.cnf


Edit the line:

[mysqld]
max_allowed_packet = 1M

with the # bytes or M that you desire. 


Save changes and restart the MariaDB service OR reboot the Synology:

/usr/syno/bin/synopkg restart MariaDB