Unix Programming - error handling when accessing NFS files

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2007 > error handling when accessing NFS files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author error handling when accessing NFS files
Ivan Novick

2007-07-28, 7:17 pm

Hi,

I am writing an app that requires numerous NFS file access operations.

It seems that some small percantage of the time file operations, such
as open file, will fail under heavy load conditions on the NFS
server. The adhoc solution I have is to wait and retry and then the
file operation succeeds. This seems really bad.

Does anyone know of a clean way to access NFS files and handle the
condition where the operation fails intermittantly, other than the
wait and try again solution? Or perhaps to handle the error as a NFS
error and not as a file is not present error?

Thank you so much for any ideas,

Ivan Novick
http://www.0x4849.net

Logan Shaw

2007-07-29, 1:19 am

Ivan Novick wrote:
> I am writing an app that requires numerous NFS file access operations.
>
> It seems that some small percantage of the time file operations, such
> as open file, will fail under heavy load conditions on the NFS
> server. The adhoc solution I have is to wait and retry and then the
> file operation succeeds. This seems really bad.


It sounds like either (a) you've encountered a bug, or (b) your NFS
filesystems are mounted with the "soft" option. If it's (b), try
mounting with "hard" instead.

- Logan
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com