Stop MySQL giving up on Drupal

Tags: 

With Drupal, if you have a content type with lots of records you can run into a problem where you start getting lots of "server has gone away" errors from MySQL. This stems from queries getting too long and MySQL giving up before the query has finished loading. So, to fix it, just edit your my.ini or my.cnf file to add the following line to the [mysqld] section:

  • max_allowed_packet=24M

There are other settings that can make a difference too, but this seems to be a good starting point.

How to reply

Care to add your own 2 cents? Let me know via Twitter or my contact page.