acidfree.module (and filemanager.module) uses flock().

from php's manual:

Warning

flock() will not work on NFS and many other networked file systems. Check your operating system documentation for more details.

On some operating systems flock() is implemented at the process level. When using a multithreaded server API like ISAPI you may not be able to rely on flock() to protect files against other PHP scripts running in parallel threads of the same server instance!

flock() is not supported on antiquated filesystems like FAT and its derivates and will therefore always return FALSE under this environments (this is especially true for Windows 98 users).

I recently switched to an nfs mounted http directory. Using this function breaks all my sites as I make extensive use of acidfree.

For info (and people searching), this is what i get in tethereal analysis:

1.364017  172.16.1.71 -> 172.16.1.201 NLM V4 LOCK Call FH:0xb0d75016 svid:4577 pos:0-0
1.364173 172.16.1.201 -> 172.16.1.71  NLM V4 LOCK Reply (Call In 6) NLM_DENIED_GRACE_PERIOD

Please consider using something else.

Thanks

geof

Comments

vhmauery’s picture

Status: Active » Closed (won't fix)

Sorry, at the moment, I cannot think of another good alternative to use. Besides, the flock call is done in a temporary directory -- that should not be on an nfs mount for performance reasons anyway. Try configuring your drupal site so the temp directory is not on your nfs share.

geofs’s picture

Besides, the flock call is done in a temporary directory -- that should not be on an nfs mount for performance reasons anyway

It isn't, /tmp is on a local disk. The problem comes from filemanager.module, used by acidfree. it creates lock files in the ./private directory...

i also filed a bug report there...