2

I have two CentOS machines (virtualized) with a mounted NFS share with the following in /etc/fstab:

<ipaddr>:/mnt/nfsshare   /mnt/nfsshare              nfs rsize=1024,wsize=1024,timeo=14,intr,cto,relatime 0 0

I have EnableMMAP Off and EnableSendfile Off in each Apache's configuration. Another server connected to the NFS will occasionally copy over a CSS file with an updated version (e.g. when someone applies changes from staging). From the shell this update appears to go through (i.e. updated timestamp and cat shows the correct data).

However, loading the file from the browser or other tools shows the outdated version. Occasionally, I'll see different responses even (the two Apache servers are load-balanced). After a while the change will seem to go through and Apache will return the correct file contents, but it usually takes a minute or two.

1 Answer 1

2

You could try replacing 'cot' with 'noac' and completely disable caching, though if your production instance is the only place this appears, you might get some performance penalties. Another option is to set acregmax=10, which will keep attributes cached for no longer than 10seconds -- by default, all attributes are cached for 60s, and while 'cto' says that attributes should be checked on open() and close() individual apache processes might still be hanging on to file handles or something.

You must log in to answer this question.

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