Over the holiday weekend my SmarterMail server went down hard (no in/out SMTP/POP3, webmail down) with the following error in the event logs...
```
System.IO.IOException: The process cannot access the file 'f:\SmarterMail\Domains\josh.com\Users\matt\settings.json' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at SmarterMail.Common.Files.FileFunctions.ReadFileFromDiskAsBytes(String path)
at SmarterMail.Common.Files.FileFunctions.ReadJsonFile[T](String path, String cacheBusterKey, Action onLoadFromDisk)
at SmarterMail.Common.Files.UserFiles.UserSettingsFile.Read(String path, String cacheBusterKey)
at MailService.Repositories.UserRepository.UserSettingsLoadFile()
at MailService.Repositories.UserRepository.UserSettingsLoadFileReadOnly()
at MailService.Repositories.UserRepository.GetUserSettingsReadOnly()
at MailService.SearchIndex.Indexing.UserIndexCoordinator.<HandleUserLoggedIn>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
```
Restarting the service seems to have gotten everything running again. Any ideas why this would happen and how to prevent it from happening again?
SmarterMail Professional
Build 8125 (Mar 31, 2022)