[Samba] Clients freezing when opening same files

Adam Nielsen adam.nielsen at uq.edu.au
Wed Feb 22 03:36:59 GMT 2006


Hi all,

I've discovered that if someone opens a file on a Samba share (say a
PDF file) then someone else comes along and tries to open it too, the
program accessing the file on the second person's PC will freeze for a
few minutes and then return a network error.  If I kill Samba and
restart it then the second person can open the file (because the lock
has been released) but then anyone else trying to access it again will
lock.

What's the best way to solve this problem?  I don't really want to
disable locks, I just want the lock to fail which will hopefully cause
the program to open the file without locking it (perhaps in 'read only'
mode.)

I've tried 'blocking locks = no' but that doesn't help, so I assume I'm
probably going to have to disable something to do with the locks.
Incidentally this was the same issue I had before, and using 'veto
oplocks' for DLL files fixed this problem (the .EXE would freeze for
5-10 minutes when loading, then return an error saying it couldn't load
the DLL.)  In this case I think the locks are completely disabled for
DLL files (i.e. they return success but they're not actually locked)
but I don't want to do this for some formats (like Access or Excel.)

Thanks,
Adam.


More information about the samba mailing list