On 27/01/2010 2:28 p.m., Dan Bunyard wrote:
This has happened twice now and it's a little bit concerning to me. I
have a Fedora 12 server with 5GB of RAM that I use to host a few small
web sites of mine. As I mentioned, this happened once before. I tried to
load one of my web sites today and it took FOREVER (as in the 10s of
minutes) to load. I SSHed into the box and found the load average around
100 (dual core machine). Since this was the second time it had happened,
I knew that it was Apache causing it. So I restarted the Apache service
and everything returned to normal. A look in the error_log showed this
error:

It's really, really easy to get into this situation with PHP + MySQL. One very long running query (e.g. that touches tens of millions of rows, probably by accident because an index is missing) holds the lock on some important table. All of the other clients have to wait for the lock. Load skyrockets.

Connect to MySQL when something like this happens and run SHOW FULL PROCESSLIST. Look for long-running queries.

Cheers,
Nicholas Sherlock


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to