httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bishop <>
Subject filehandle caching and nfs
Date Thu, 02 May 2002 22:49:45 GMT
Hash: SHA1

[I am sending to dev@ as I 1) think that this will require a source-code fix, 
and 2) user@ had no help for me]

I have a problem with our apache webserver (v. 1.3.14), running on solaris 7.
A lot of our directories are auto-nfs mounted (esp. the ~username stuff).
95% of the time it works great, however, intermittently, it will return "no
such file or directory", for files that were there 5 minutes before, and
still are there if you rsh to the webserver and look at the filesystem.  And,
most importantly, refreshing the page "fixes" it (i.e., returns the correct

My theory for what's happening is that the automounter daemon unmount the fs
after 5 minutes of inactivity, but that apache "caches" the filehandle that
it used the last time.  Then, when you go to hit that page again, it looks at
"/amd/u2pesfs2/blah/foo", rather than "/u/blah/foo", which (obviously)
doesn't work as the /amd/... has been unmounted, and isn't automatically
remounted just by referencing it (as opposed to /u/...).  It then returns a
404, and flushed the fh out of it's cache. Thus, the next time you request
the page, it goes for the /u/blah/foo, the fs is automounted again, and
everything is fine.

Now, the question is, how do I fix this?  It appears that apache does flush
the filehandles out of it's cache after a set amount of time, or we would run
into this problem a lot more often.  How do I adjust that amount to be less
than 5 minutes? Or, alternatively, change it so that if it has cached the fh,
and gets a "no such file", that it "starts from the beginning", and tries it
uncached, before returning the 404?

Any help would be greatly appreciated, and many thanks for a fine webserver.

- --
"Microsoft is a cross between The Borg and the Ferengi. Unfortunately 
they use Borg to do their marketing and Ferengi to do their programming."
								Simon Oke
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


View raw message