Mysql2 Error MySQL server has gone away

ziCk picture ziCk · Jul 24, 2011 · Viewed 13.7k times · Source

I am getting this error occasionally. I have read some solutions in stackoverflow but they were about rails 2 or mysql. Any help will be appreciated.

ActiveRecord::StatementInvalid (Mysql2::Error: MySQL server has gone away

Answer

Ray Fix picture Ray Fix · Aug 1, 2011

There are numerous causes for the error. See below page for possible causes. Perhaps your packet size is set too small.

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html