The root cause is another query that has tables locked that your "locked"
queries want. Behind that may be, for example, an inefficient but
often-executed query, high I/O concurrency that has a cumulative slowing
effect, or maybe simply a long-running update that might be better scheduled
during the quiet hours.
You can kill the "locked" queries, but it is likely that more will simply
appear in their place. You can kill the evil monster query, but depending on
what's actually going on it's quite possible that one of the waiting ones
will take it's place as the resource hog.
Sometimes a quick fix is to simply restart the service, if there's just too
much competition for the same locks; but obviously the problem will just
What you need to do is figure out which query is holding the locks, and see
if you can optimize and/or reschedule it.
On Thu, Oct 14, 2010 at 9:01 AM, monloi perez <mlp_folder@stripped> wrote:
> Is there a mysql configuration to kill queries that have been locked for
> some time. If there's none what is an alternative approach to kill these
> queries and what is the root cause of it?
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel