Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
To set the max_allowed_packet to 256M, you can add it to /etc/my.cnf or my.ini
[mysqld]
max_allowed_packet=256M
Keep us updated!
You sure its /etc/my.cnf or my.ini?
I added this in /etc/mysql/mysql.conf.d/mysqld.cnf which didnt fix my issue but when i restart mysql services, i saw that it changed the values in the sql error logs.
It'sRandinator wrote:my.cnf or my.ini is fine. If I remember correctly you don't edit mysqld.cnf.
Yeah well my.cnf is what i have and it was useless and didnt change anything. max_allowed_packet was in mysqld.cnf so i changed it to 512M and then ran mysqld --verbose --help which showed that it was now at 512M but still seem to be getting the same communication errors.
It'sRandinator wrote:Use mysql --print-defaults after restarting to see that your settings have taken effect.
I tried it and it said "mysql would have been started with the following arguements:" (then nothing else shows)
It'sRandinator wrote:And post it. Are you hosting mysql yourself?
Yes hosting mysql myself
It'sRandinator wrote:Check the ifconfig -a output on the MySQL server to check if there are errors.
0 errors
It'sRandinator wrote:Check to see if you have enough memory allocated to mysql.
Not sure how to check this.
It'sRandinator wrote:Try raising net_write_timeout see if that helps.
net_write_timeout isnt in my /etc/mysql/my.cnf or /etc/mysql/mysql.conf.d/mysqld.cnf (i could possibly add it here manually but have not sure how much you'd want me to set it to.)