Continue in the app
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

Problem: Cannot acquire a lock while accessing data on a file share using SMBv2


When performing various workflows within ArcGIS for Desktop, users may experience the error that a lock cannot be acquired. If this data exists on a file share such as a Network Attached Storage (NAS) or other device using Samba over SMBv2, there may be a problem with the Windows SMB2 cache. Users may experience this issue when a program creates a file, such as a lock file, and then verifies the file exists immediately after creation.

This issue does not affect file shares over SMBv3, as SMBv3 implements DrirectoryLeasing, which makes the metadata cache for SMB a coherent cache and renders the DirectoryCacheLifetime parameter, the root cause of this issue, obsolete.


This problem is due to an issue within the SMB2 Client Redirector cache. At the Windows Vista and Server 2008 release, three file metadata caches were implemented to speed up the return of the most recently accessed file and directory information. However, by default, at the Windows 7 and Server 2008 R2 releases, these caches are set to refresh every ten seconds. In the case of ArcGIS for Desktop lock creation, this cache regeneration is not fast enough.

For more information, see the following Microsoft TechNet article: SMB2 Client Redirector Caches Explained.

Solution or Workaround

To resolve this issue for ArcGIS for Desktop, the registry must be updated to disable the SMB2 caching. Alternatively, force the connection over SMBv3 if possible. 

  1. As the computer administrator, open the Start menu and type regedit.exe to open the Registry Editor.
  2. Navigate to the following registry key:
  1. Check to see if the name DirectoryCacheLifetime exists within the key.
  2. If the name does not exist, create a new 32-bit DWORD (right-click and select New > DWORD Value) and name it DirectoryCacheLifetime.
  3. Once the name DirectoryCacheLifetime exists, modify the DWORD value to be 0.
Image of the registry editor
Depending on the organization's privilege settings, the machine may need to be rebooted after making these registry changes.

Last Published: 2/25/2020

Article ID: 000012722

Software: ArcMap 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5, 10.4.1, 10.4, 10.3.1, 10.3, 10.2.2, 10.2.1, 10.2, 10.1, 10