What Operating System are you using?
I use to get the same error when I used Windows, but now I am on a Unix system and no longer get that error.
I found that this error happens when your query takes too long. But if you look
at the process list you will find that your query is still running fine. So if you are not using a SELECT query, you have nothing to worry about.