Thursday, April 27, 2017

MySQL intermittent disconnects

Something happened. I'm not sure what. I didn't think much of it in the beginning, and for the previous few days, assumed that the exceptions being thrown out were because of bug in my codes. I was wrong.

The main problem revealed itself as a message of "SQL Error: 0, SQLState: 08S01- SqlExceptionHelper:144 - Communications link failure", which doesn't really say much.

Upon closer inspection, I realised that, even without the application running, my connection to the database over TOAD was failing. It was failing especially when I mouseover a specific table. Bad news. It was useless to run mysqlcheck because the connection would kill itself the same.

Extra parameters for autoReconnect didn't work too. Obviously, because the table was corrupt. There was no easy way to recovering it. Fortunately, as it was an ARCHIVE table, I made the decision to drop the table entirely, and recreate it anew. And that put me back on track... to fixing other bugs.