I know this is really outdated, but I had the same problem. Make sure the max_allowed_packet=512M (or 2048M in my case) is under the [mysqld] section.
Hardware and performance
MySQL server has gone away
This discussion has been locked so you can no longer reply to it.