David Sparks <[EMAIL PROTECTED]> wrote on 08/08/2005 12:20:41 PM:

> Hi all!
> 
> Gleb Paharenko wrote:
> > Hello.
> > 
> > 
> > 
> >>I have a query that is taking days to complete (not good).  If I 
change
> > 
> > 
> > Really, not good. What does SHOW PROCESSLIST report about the thread 
of 
> > this query?
> 
> The query has been running for ~5 days now:
> 
> 
>      Id: 27977
>    User: root
>    Host: localhost
>      db: fractyl
> Command: Query
>    Time: 421540
>   State: Sending data
>    Info: select count(*) from msgs where message_id > 1120000000 and
> message_id < 1120000111
> 
> 
> I also tried using the BETWEEN syntax but it has exactly the same 
problem.
> 
> Any other ideas?
> 
> ds
> 
I am in no sense of the word a linux guru (I think I remember you saying 
this was runnin on a *nix box) but if we can detect no file activity and 
minimal CPU activity and minimal page swapping, can we assume that MySQL 
has gone into a 'coma' because something failed silently? IMHO, this is 
way too long for an indexed lookup. 

Would some of you *nix gurus out there suggest ways of how to detect what 
zombified his server (it is still running but doing no useful work). There 
should be some way of detecting if it has lost some memory handles or 
there is some sort of deadlock (mutex or semaphore contention) or that a 
vital subthread is somehow hung or dead.... Linux is way better at 
providing kernel/OS level information than windoze so I think he should be 
in good shape to get to the bottom of this. However, I think we can all 
agree that his server is kaput and it's time to do an autopsy to figure 
out why.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to