Does this same error happen every time you run the same query?
How about other queries?
Is there any pattern other obvious to it?
It's an error message that would worry me if I saw it, because it looks like the query that you're passing is causing the DB connection to be dropped.
If it's happening consistently in the same place, then I'd suggest there's something in that specific query which is causing MySQL to freak out. This could mean that you're triggering a fatal error, possibly you've found a bug in MySQL.
Firstly, are you running the latest versions of PHP and MySQL? If not, consider updating and trying again -- if you have found a bug, it may have been fixed already.
If you can get it to happen consistently, try printing the query to screen before it crashes, and then see what happens when you run that same query directly at the MySQL command prompt. That might give you a better diagnostic message of what exactly is going wrong.
Also, once you know what the query is that's triggering it, you can try tweaking it to see if you can find out what part of the query is triggering it.
Hope that helps, and I hope you manage to solve the problem. (if you do, please let us know what it was!)
All the best,