Apache timeout when soft nfs mount is not responding
I've got a rather sickly storage appliance (Netapp FAS2020 running ontap 7.2.7) that doesn't like to work very hard. It's exporting a volume via NFS and my Centos 4.2 box is mounting read only. Apache 2.0 is running on my CentOS box and when the storage appliance's cpu reaches 100% utilization the CentOS box's load reaches 256.
What I want is for nfs to time out rather quickly and respond to Apache with an error so Apache can then issue a 500 that is cacheable by Varnish. I've done a bit of digging with google and what I've read is that there isn't an Apache setting to have Apache timeout when going to the file system (albeit NFS or local). It was suggested to alter how my CentOS box mounts the export (soft vs. hard) as well as to tweak the nfs settings timeo and retrans; however that isn't yielding much success. Since I'm mounting the volume read only I'm comfortable also mounting it soft. I've set timeo=1 and retrans=1 but when I look in /proc/mounts after making the change I don't see the timeo or retrans values reflected by the kernel. Will /proc/mounts display the timeo and retrans values ever? BTW this is nfs version 3.
Turns out my nfs options were working and behaving properly. I was expecting the wrong error code in Apache. I was expecting 500 whereas Apache was returning 404's. Here are the nfs mount options I am using: ro,soft,timeo=1,retrans=0,udp,intr,noac
I used iptables to drop all outgoing packets destine to my NFS server and Apache began responding (rather quickly) with 404's.
|All times are GMT -5. The time now is 03:47 AM.|