1

I have an Apache server that's accessing source code over NFS (from a separate dedicated NFS file server). Periodically the Apache server stops accepting new requests (effectively bringing down the server), and when I look into it, it's filling up MaxClients. Upon further research, the site is not that busy... the reason the stack filled up was each Apache process is stuck in a "sending Reply" state (all W's via mod_status). Additionally in top, each apache process is in state "lockf", which makes me think it's an NFS issue. I can't find much information about it online, and I've been pulling my hair out this weekend trying to figure it out. Does anyone have any ideas on what might be going on, or how I can further diagnose the problem?

Thanks so much!

3
  • What are the NFS mount options you're using?
    – al.
    Oct 11, 2010 at 14:34
  • What kernel version are you using? Please paste the output of uname -a Oct 11, 2010 at 15:02
  • It's a freeBSD system: $ uname -a FreeBSD -my-host-name-.com 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07 UTC 2009 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
    – Harry
    Oct 11, 2010 at 17:29

3 Answers 3

0

James Yale is correct. You are currently suffering from the dreaded "Perpertual Bush Syndrome" (no one likes to be stuck with "W" forever). In short, you have to track down which script is "stuck in W" and find out what variables that's being passed to the script that results in the lock. here's a very good article that should help: Solving Httpd MaxClients and mod status "stuck in W"

1

We've just had an issue with similar symptoms here, servers get to MaxClients then the number of apache processes doesn't drop and new clients can't connect.

It appears the issue was caused by deadlock from the interaction of our web applications and the MaxClients setting on Apache. I was pointed in the right direction by another question here on ServerFault: Apache reaching MaxClients and locking the server

edit: Incidentally since we can't fix our application at the moment we've had to settle for adding more web servers and un-capping the MaxClients setting.

1
  • Does this cause your apache processes to go into a lockf state?
    – Harry
    Oct 12, 2010 at 16:38
0

If your logs are being written to your nfs server, make sure you specify the Lockfile directive to be on a local disk.

1
  • Logs are not being written to the NFS server (all logs are written locally, normal configuration).
    – Harry
    Oct 12, 2010 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .