Re: MySQLQueryInterruptedException while no one killed the query
Posted by: Todd Farmer
Date: October 06, 2014 04:04PM

Hi Nikolay,

Yes, it's possible that a KILL QUERY command has race conditions such that the target query isn't killed, but the flag is set and the subsequent operation is affected:

http://bugs.mysql.com/bug.php?id=70618

In your Java code, you might look for calls to Statement.cancel() or Statement.setQueryTimeout() (it's possible to set the timeout to 0s, or that the race condition causes a prior timeout KILL operation to affect subsequent statements).

No matter what, this is going to manifest itself as a KILL command (and an incrementing of the Com_kill counter mentioned earlier). Checking that is the quickest way to see what's going on.

Because you're running MySQL 5.5, the PERFORMANCE_SCHEMA method described in my blog post doesn't apply, but you can still enable the general query log, and track what's happening there. It's a quick way to see who's issuing the KILL command (and when).

Hope that helps!

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.