2
Failed to load domain exception after upgrade to Build 7803
Problem reported by Webio - 5/17/2021 at 3:31 AM
Submitted
After about 30 minutes of struggle I've returned to previous build which have started in minutes. (On my environment I also don't have Defender installed.)

In the end I've returned to previous build and sent support ticket describing problem with screenshots and some weird log entries.

If you've upgraded, can you check if you have error log from time when you where updating SM and failed with filename:

2021.05.17-load.log 

I've started to update on 6AM and reverted to previous build on 6:30 AM and this log has 2GB size and starts on 6:13 and ends on 6:18 and contain a lot of errors like this one below (DOMAINAME is a real domain name). This might be from the time when I've restarted service to check if restart will fix this problem. I've also saw in perfmon a lot of trying to read settings.json files from various domains.

06:13:37.323 Failed to load domain DOMAINAME: System.Exception: Error get domain settings: A read lock may not be acquired with the write lock held in this mode.
Stack Trace:    at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(TimeoutTracker timeout)
   at SmarterTools.Common.ExtensionMethods.RWLSExtension.ReadLockHelper..ctor(ReaderWriterLockSlim readerWriterLock, String memberName, String filePath, Int32 lineNumber)
   at MailService.Repositories.DomainRepository.LoadAllDomainSettings()
   at MailService.Repositories.DomainDataCache.CacheGet[T](String item, Func`1 getter)
   at MailService.Core.Domain.get_DomainSettings()
   at MailService.Core.Domain..ctor(String name, String rootDirectory, DomainRepository repo)
 ---> System.Threading.LockRecursionException: A read lock may not be acquired with the write lock held in this mode.
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(TimeoutTracker timeout)
   at SmarterTools.Common.ExtensionMethods.RWLSExtension.ReadLockHelper..ctor(ReaderWriterLockSlim readerWriterLock, String memberName, String filePath, Int32 lineNumber)
   at MailService.Repositories.DomainRepository.LoadAllDomainSettings()
   at MailService.Repositories.DomainDataCache.CacheGet[T](String item, Func`1 getter)
   at MailService.Core.Domain.get_DomainSettings()
   at MailService.Core.Domain..ctor(String name, String rootDirectory, DomainRepository repo)
   --- End of inner exception stack trace ---
   at MailService.Core.Domain..ctor(String name, String rootDirectory, DomainRepository repo)
   at MailService.Core.Mailman.LoadDomain(DomainListDomainItem domainItem)

Reply to Thread