Skip to main content
Skip table of contents

How does the Lock function behave when there is a disconnect between Agents and the PMC and broker?


If one of the participants in a File Collaboration job has a network failure (the internet connection between an Agent and broker fails but the server still reachable locally), how does locking behave within the job and between the participants?


If a file was opened on Server A, it is locked on Server B (C, D, E,...). If Server B then loses connection to the broker, the file on Server B will remained locked since it has not received a release command yet. The file will remain locked until either the connection is re-established or the Peer Agent Service is restarted on that server.

The following example illustrates this process.

In this example, Server A is delab1srv3 and Server B is delab1srv4.

The Offline-Lock-Test.docx file was opened on delab1srv3 and thus was locked on all the other participants.  After that, connection between delab1srv4 and the broker was cut off and the file was closed on the source (delab1srv3) for this test. However the file remains locked on delab1srv4 but get released on all of the other participants.

This is because the Agent cannot be reached, so the release command cannot be send to the disconnected Agent.

Users can still work with the file on the connected participants (modify, rename, delete, or move), and PeerGFS will register each change.

Once changes are made, PeerGFS will try to contact delab1srv4 to push the changes through, but as it is not reachable, it will disconnect that Agent from the collaboration. Once the connection is re-established, the changes will be put through and the lock will be released. As shown below, a scan will be started to compare and match all watch sets again.

From PeerGFS v5.1 on, there is an enhanced method to change the behavior of a disconnected Agent. It will restart the Agent service on a disconnected server after a specified time to release all potential file locks. This functionality is not enabled by default.  Please contact Peer Software if you are interested in implementing this.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.