clamb-esristaff

Windows Server 2016 - OpLocks and Leasing Issues

Blog Post created by clamb-esristaff Employee on Dec 10, 2018

I have been running into issues with two “features” of Windows Server 2016 while at client sites recently; Leasing and Oplocks. Leasing is fairly new, introduced as a new type of client caching mechanism in SMB 2.1.  It claims to offer more flexibility for controlling client caching and claims significant performance improvement in high latency networks. Opportunistic locking, or Oplocks, is a client caching mechanism that allows SMB1/SMB2 clients to dynamically decide the client-side buffering strategy, so the network traffic can be minimized.

 

Oplock requests often do not get a response in a timely fashion, you might see a up to a 35 second delay, which is the default timeout for an Oplock. This will cause application timeouts or what seems like a hanging application from the user’s perspective. Both Oplocks and Leasing can play havoc with an ArcGIS Server Site’s config-store when it is located on a file share that has these features enabled. Symptoms are disappearing services; duplicate services; and machines in a multi-machine site becoming unresponsive or locking-up, just to name a few.

 

Use the following steps to disable these features on the Windows Server 2016 hosting the share, and on the clients accessing the share. Be aware that it appears that some Microsoft Updates when applied reenable these settings by default.

 

On the Windows Server 2016 acting as the file server, check the SMB Server Configuration in PowerShell.

 

If Leasing or Oplocks are “true”

Set both to “false”

Set-SmbServerConfiguration -EnableLeasing $false

Set-SmbServerConfiguration -EnableOplocks $false

  

Verify settings in PowerShell.

 

 

On the Windows Server 2016 Clients to the share (ArcGIS Server and/or Portal), check the settings in PowerShell. These steps should not be needed for clients (ArcGIS Desktop, ArcGIS Pro, or ArcGIS Server) accessing file shares for data such as MXDs, FGDBs, Registered Folders, etc.

 

 

If OplocksDisabled is False

Set it to “$true”

Set-SmbClientConfiguration -OplocksDisabled $true

If UseOpportunisticLocking is True

Set it to “$false”

Set-SmbClientConfiguration -UseOpportunisticLocking $false

 

 

Verify settings on clients using PowerShell.

 

Outcomes