Re: MySQLQueryInterruptedException while no one killed the query
Posted by: Nikolay Karasev
Date: October 06, 2014 10:48AM

Todd, thanks for trying to explain!

However there is one thing for certain - no one issues the KILL command in our case, at least not in the code that wee control. We see that this exception occurs about 2 milliseconds after the query was executed - too early for anything to kill it anyway. I expect time between kill command and query responding to it would be way longer, something around 1 second.

I suspect that somehow this relates to heavy load of DB. Maybe code somewhere inside mysql JDBC gets confused and throws this error (or issues KILL) when there is too many connections around? Still we have plenty connections in the pool available when this happens (1000 total for DB and 200 for JVM, where current connection count is around 130 for given JVM when this error occurs). Maybe not all returned connections are actually become available at this time? I would accept this as answer if it was possible, though the pool is configured to wait for available connection up to 1 second before giving up, so this is still only a feasible explanation for error but not the right one.

About the query you suggested to run: SHOW GLOBAL STATUS LIKE '%kill%';
When would this query need to be executed? right after exception or some delay is OK? Should it be run only from command line client or can it run by JDBC (I doubt the later)?

Thanks,
Nikolay

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.