I recently experienced a problem with a complex MySQL query which reported “MySQL server has gone away” and then just stopped.

There are plenty of posts with suggestions to help you fix this rare but annoying message and it’s likely they will help you more than this post. However I found a solution, and one that I could replicate so that for my particular issue have conclusive evidence of the cause. An unusual luxury.

Remove flush()

It is as simple as that. If you find flush() is called at any time while processing a page that suffers this error, rem it out and try again. More information on flush() can be found here: http://uk3.php.net/flush

Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • Live
  • MySpace
  • PDF
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Buzz
  • Add to favorites

Tags: ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">