# LiteDB Mutex Crash I ran into the following unhandled exception with LiteDB. Turns out it's a [known issue](https://github.com/mbdavid/LiteDB/issues/1546) related to shared database access. Solution I picked was to simply configure LiteDB to use file locking using the direct connection type (configurable using the [[Connection String - LiteDB A .NET Embedded NoSQL Database|connection string]]). ``` System.ApplicationException: Object synchronization method was called from an unsynchronized block of code. at System.Threading.Mutex.ReleaseMutex() at LiteDB.SharedEngine.CloseDatabase() at LiteDB.SharedDataReader.Dispose() at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList() ```