1
Random errors with document viewer when used in load balanced multi server mode
Problem reported by Vinay B R - 6/26/2017 at 2:54 AM
Not A Problem
We get random errors when loading documents in load balanced multi server mode. List of errors we receive -
Cache file does not exist
Invalid XPZ file: Zip end header data is Wrong size!
Document Load Error:
GleamTech.DocumentUltimate.Web.DocumentViewerException: (32) The process cannot access the file because it is being used by another process: ---> GleamTech.Caching.DiskCacheException: (32) The process cannot access the file because it is being used by another process: ---> System.IO.IOException: (32) The process cannot access the file because it is being used by another process: [\\?\c:\temp\Storage\dvcache\~Schedule Status Report_20170621_124649.xlsx~k6qw9r\~k6qw9r~.json]
   at Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath)
   at Alphaleonis.Win32.Filesystem.File.CreateFileCore(KernelTransaction transaction, String path, ExtendedFileAttributes attributes, FileSecurity fileSecurity, FileMode fileMode, FileSystemRights fileSystemRights, FileShare fileShare, Boolean checkPath, PathFormat pathFormat)
   at Alphaleonis.Win32.Filesystem.File.CreateFileStreamCore(KernelTransaction transaction, String path, ExtendedFileAttributes attributes, FileSecurity fileSecurity, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, PathFormat pathFormat)
   at Alphaleonis.Win32.Filesystem.FileInfo.Create()
   at GleamTech.Caching.DiskCache.AddOrUpdate(DiskCacheKey cacheKey, Action`1 createAction)
   --- End of inner exception stack trace ---
   at GleamTech.Caching.DiskCache.AddOrUpdate(DiskCacheKey cacheKey, Action`1 createAction)
   at GleamTech.DocumentUltimate.Web.DocumentViewer._UlG(TextWriter textWriter)
   --- End of inner exception stack trace ---
 

2 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
From version history:
 
Added: Load balancer support. DocumentViewer can now work properly in multi-server environments or cloud (e.g. Azure) where in-memory session is not available. Session serialization is fixed to support all session modules. You still need to have a shared cache folder between multiple instances/servers.
 
So you need a common folder which can be accessed by multiple instances. See here:
 
If you are using Azure VMs, you can mount a file share so instead of this cache path:
c:\temp\Storage\dvcache\
You can use a file share:
\\shared\dvcache
I guess this may not be possible if you are using a WebApp service (refer to the link for details).
However we plan to add Azure provider for DiskCache so that it works even with WebApp services.
 
 
0
Vinay B R Replied
Hi Cem,
 
I should have mentioned this in the question.
The first two errors are from multiserver deployment, the last one was observed on my dev system which uses outproc session but has just one server.

Reply to Thread