1
Unable to acquire lock zxy.json immediately
Problem reported by L.T. - 3/2/2022 at 11:47 PM
Resolved
Version:
  1. Gleamtech.Common v5.0.0
  2. Gleamtech.DocumentUltimate v6.1.0
Full error message:
Unable to acquire lock 1hwqcio~xxgoqq~xxgoqq~nnurhs.json immediately
   at GleamTech.DistributedLocking.DistributedLockManager.Lock(Object requester, String name, Int32 timeoutSeconds, IDistributedLockProvider provider)
   at GleamTech.Caching.FileCache.Get(FileCacheKey cacheKey)
   at GleamTech.DocumentUltimate.AspNet.DocumentCache.LoadCacheInfo(FileCacheKey cacheInfoKey, Boolean throwIfNotExists, Boolean ignoreDeserializationErrors)
   at GleamTech.DocumentUltimate.AspNet.UI.DocumentViewerHandler.DownloadDocument(String stateId, String cacheInfoKey, String attachment)

This error shows up most of the time when 1) loading a converted Microsoft Excel file, 2) scrolling through the side pane (regardless of converted document type).

Any advise to prevent this error is appreicated. 

4 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
Hi,
 
Upon further investigation, the error is showing when document viewer was loaded with a height of at least 800px and has abt 10 thumbnails at the side pane.
It should not be about viewer height or thumbnail count.
The document is loaded partially when you scroll. So if you have a bigger document then the server will be called again when you navigate more pages.
 
The actual problem is in your file system.
Where is your DocumentCache location? Maybe you don’t have enough  NTFS permission (should be Modify) in your cache folder?
 
What is your project type? If it’s .NET Framework 4.x, you can also try this setting:
0
L.T. Replied
It should not be about viewer height or thumbnail count.
The document is loaded partially when you scroll. So if you have a bigger document then the server will be called again when you navigate more pages.
I observed the error only when the document viewer is of a certain height and not when I set the document viewer to say, 400px (instead of 800px). And having side pane visible or not seems to affect the frequency of this locking error. Also, when this error shows up, some of the thumbnails images was not showing up (ie. 3 out of 10 thumbnails is showing blank although i can still click on it to load the correct page of the main document)

If it was my file system permission, i would expect it show the error everytime i load the document and not sometimes and not when i set the height or side pane visible or not. Also, note that this is issue is reproducible in 3 different machines.

My DocumentCache location is just a temp folder under the project and it has all the required permission for writting to it.

My project is using ASP.Net forms version of the viewer with .Net Framework 4.7.2.

Setting "AlphaFileSystemEnabled" to false still shows the same error unfortunately. 

0
Cem Alacayir Replied
Employee Post Marked As Resolution
It seems, you have set value of DocumentUltimateWebConfiguration.CacheWaitTimeout property to 0 so you cannot acquire locks when there are multiple simultaneous requests (thumbnails in your case).

 Please leave it at default value (5 minutes).
 
This property does not effect performance so setting it to 0 is not useful.
0
L.T. Replied
Cool, thanks! We actually intended to set the CacheWaitTimeout property to 15 mins but a bug in the code does set that property to 0 instead. I fixed that and it does seems to be working much better now. Thanks for your help.

Reply to Thread