MySQL Server has gone away!

MySQL Server has gone away!

Submitted by Jitesh Doshi on Fri, 09/21/2012 - 13:45
MySQL logo

While using or coding Drupal, if you come across an error to the effect "mysql server has gone away", right in the middle of a request, you may need to do the following.

Find the my.ini file under MySQL server installation directory (mine is under "data" subdirectory), and in the "[mysqld]" section add the following line (or replace the value if it already exists):


Now restart MySQL server and try again. It should work. If it doesn't, try a value higher than 16M.

Jitesh Doshi

Profile picture for user Jitesh Doshi
Managing Partner & CTO
  • A seasoned technology entrepreneur and enthusiast
  • A regular speaker at industry conferences and universities
  • Host and organizer of technology user groups
  • Active in management of non-profit organizations serving the local community
  • Leader and contributor for multiple open-source projects
  • Expert in cloud, application integration, web and mobile technologies
  • Author of open-source projects, including on - Popular Tags and PRLP.
  • Developed several highly successful software platforms and frameworks for clients