celery exceptions creates .nfs0000* files

118 views Asked by At

I have several celery tasks, that are operating on an nfs share over nfsv4 (netapp as backend).

From time to time, I assume after an exception from a task is raised, .nfs0000* files appearing on the share and disapear only if I restart celery.

I previously found this:

Under linux/unix, if you remove a file that a currently running process still has open, the file isn't really removed. Once the process closes the file, the OS then removes the file handle and frees up the disk blocks. This process is complicated slightly when the file that is open and removed is on an NFS mounted filesystem. Since the process that has the file open is running on one machine (such as a workstation in your office or lab) and the files are on the file server, there has to be some way for the two machines to communicate information about this file. The way NFS does this is with the .nfsNNNN files. If you try to remove one of these file, and the file is still open, it will just reappear with a different number. So, in order to remove the file completely you must kill the process that has it open.

If you want to know what process has this file open, you can use 'lsof .nfs1234'. Note, however, this will only work on the machine where the processes that has the file open is running. So, if your process is running on one machine (eg. bobac) and you run the lsof on some other burrow machine (eg. silo or prairiedog), you won't see anything.

(Source)

Any Ideas how I can prevent that?

0

There are 0 answers