LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


LinkBack Search this Thread
Old 10-25-2011, 01:57 PM   #1
LQ Newbie
Registered: Apr 2008
Location: MD
Distribution: CentOS, Fedora
Posts: 14
Blog Entries: 1

Rep: Reputation: 0
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.

Old 10-25-2011, 04:22 PM   #2
LQ Newbie
Registered: Apr 2008
Location: MD
Distribution: CentOS, Fedora
Posts: 14
Blog Entries: 1

Original Poster
Rep: Reputation: 0
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.


apache2, centos4, nfs, timeout

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS : soft mount, but operations still hang contremaitre Linux - Networking 9 02-14-2010 12:24 PM
"mount.nfs: an incorrect mount option was specified" (soft) catkin Linux - Networking 2 09-19-2009 05:30 AM
Reducing the timeout duration for NFS Mount paragkalra Linux - Networking 1 02-02-2008 01:12 AM
rsync: Timeout, server not responding mr_scary Linux - Networking 6 01-28-2007 08:37 AM

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration