Questions tagged [locking]

46 questions
18
votes
4 answers

File locks on an NFS?

My server uses NFS (Network File System), and I'm unable to use PHP's flock() -function. Is there a way to lock files on an NFS or is there a need to do so?
rFactor
  • 367
  • 1
  • 3
  • 13
9
votes
6 answers

How do you know who or what is locking a remote file?

I can tell what process is holding a lock using Unlocker. But the problem is that, when there is a lock on a file on a remote machine, Unlocker doesn't show who or what process is locking. Is there anyway what is holding a lock on a remote file (my…
dance2die
  • 1,961
  • 7
  • 31
  • 40
8
votes
2 answers

Avoid /usr/bin/xauth: error in locking authority file /home/user/.Xauthority

In batch scripts I often log in to the same system through ssh multiple times. E.g. seq 1000 | parallel -j0 -S server echo This triggers a race condition giving the error: /usr/bin/xauth: error in locking authority file /home/user/.Xauthority How…
Ole Tange
  • 2,836
  • 5
  • 29
  • 45
6
votes
3 answers

How do you know who or what is locking a removable disk?

I was reading that question How do you know who or what is locking a remote file? and I remember that question... even in Windows7, the Windows doesn't show that program is locking the removable disk, so we cannot safely remove the hardware. There…
Click Ok
  • 956
  • 4
  • 12
  • 18
5
votes
1 answer

How can I test whether fcntl() locks work with my NFS setup?

From the SQLite FAQ: Can multiple applications or multiple instances of the same application access a single database file at the same time? … SQLite uses reader/writer locks to control access to the database. … But use caution: this locking…
200_success
  • 4,701
  • 1
  • 24
  • 42
5
votes
2 answers

MS Sql Server getting overloading with 'Suspended' queries, mostly reads. Any way to fix this?

I have a Microsoft Sql Server that handles a moderate amout of traffic for a company software suite made up of multiple clients in java and c#. It is getting overloaded with 'Suspended' queries. They eventually go through, but some are timing out…
AAA
  • 247
  • 1
  • 2
  • 9
4
votes
2 answers

How to detect exceptionally long file locks in linux?

I have a point of contention on my linux server. One of a number of processes access a single file and lock the file at a random time for a considerable period (>60 seconds) which, in turn, causes other things to fail. Is there a way to detect how…
4
votes
1 answer

Executing multiple commands with setlock

In a bash script I would like to execute multiple commands while keeping a file locked with setlock. Setlock however only supports the following usage: setlock [-NnXx] [lock file] [command] Is there a way to wrap multiple commands together besides…
John
  • 43
  • 4
3
votes
1 answer

Files locked for on user on Windows Server 2016

I am running a file server on Windows Server 2016 with ~15 users. One user has a lot of difficulty accessing files on the shared drive. The following occurs: Many (sometimes all) files are locked and the user gets a popup that "Another user" is…
Cliff
  • 131
  • 1
  • 4
3
votes
1 answer

ZFS over NFS concurrent write issues

I run a Proxmox cluster, and on this cluster, I have a few VMs on a private network, with a (Proxmox-managed) CEPH storage backend for the VM disks. One (KVM) VM running "Ubuntu 16.04 server minimal vm" is configured with a second "hard disk", set…
3
votes
0 answers

Linux NFS server refuses blocking locks

So I have this problem. This horrible, awful problem. I have a set of Linux NFS servers (in a NFS/CIFS cluster using CTDB) that refuse locks… only when the lock is blocking. If it's a non-blocking call, it works just fine. See the traffic flow…
MikeyB
  • 38,725
  • 10
  • 102
  • 186
3
votes
2 answers

Shared block device file system (cluster file system without networking)

Is there any file system that can be mounted multiple times and supports concurrent file access for Linux? Basically I want something like a cluster file system but without the need to have a running network for a distributed lock manager. That can…
fungs
  • 61
  • 3
2
votes
0 answers

(How) should I lock a Maildir mailbox managed by Dovecot before creating a backup via rsync?

I maintain an IMAP server running Dovecot which uses Maildir as the storage format for the user mailboxes. Every night, an rsync process runs to create a backup of the mailboxes. Recently, I noticed that rsync occasionally prints messages like file…
Frerich Raabe
  • 801
  • 7
  • 15
2
votes
0 answers

how to determine which process/thread holds the flock

When one or more processes/threads do an flock, how to determine who is currently holding the lock. 'fuser' on the file shows all the threads holding and waiting for the lock, not just the one who is the current lock holder. related thread :…
2
votes
1 answer

Windows Server 08 R2 file share File locking, OSX clients

I've spent the last two weeks banging my head against this wall. I think I'm starting to understand the problem though. I manage a design company and they have 5 macs (OSX 10.5/.6/.7) connected over SMB to a Windows 2008 R2 file server, another…
1
2 3 4