重复的SQL错误:2006:MySQL服务器已经消失

I have a recurring issue with a CakePHP application. On a daily basis the error logs are showing

SQL Error: 2006: MySQL server has gone away in [/home/t553788/public_html/res360/res/cake/libs/model/datasources/dbo_source.php.

I have contacted my hosting company and the MySQL server timeout value has been increased but this hasn't prevented the error from occurring.

Has anybody any idea as to what else may be causing this and also how would I go about presenting a custom error to the user when this happens?

You should try changing in my.cnf/my.ini these variables and see if it helps.

[mysqld]

max_allowed_packet=12M

wait_timeout=28800