question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception during multiprocess concurrent access to LiteDB

See original GitHub issue

During develop we got such exception:

Exception Information

Message: Timeout. Database is locked for more than 00:01:00 Source: LiteDB TargetSite: Void TryExec(System.Action) HelpLink: Type: LiteDB.LiteException Place: 1 Stack: at LiteDB.FileDiskService.TryExec(Action action) at LiteDB.FileDiskService.DeleteJournal() at LiteDB.TransactionService.Complete(LiteTransaction trans) at LiteDB.LiteTransaction.Commit() at LiteDB.DbEngine.WriteTransaction[T](String colName, Boolean addIfNotExists, Func2 action) at LiteDB.DbEngine.Update(String colName, IEnumerable1 docs) at LiteDB.LiteCollection`1.Update(BsonValue id, T document)

Single litedb file is used across 10 processes. I’ve read that you completely updated concurrency, is this problem still possible in v3?
If such kind of concurrency isn’t task of litedb we probably could use mutex, not concurrent access to db for many processes.

One more question: when stable version of v3 would be available?

Thanks for litedb, it’s really simple and fast!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mbdavidcommented, Jan 11, 2017

Hi @podkolzzzin, thanks! My plans is release v3 next weekend in nuget. I need just review some code, do more unit tests and publish, After this, I will update all wiki documentation and site.

0reactions
mbdavidcommented, Apr 22, 2018

Hi @vbguyny, try use v4 version, because concurrency was re-write to work better than v3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLite Concurrent Access
Does SQLite3 safely handle concurrent access by multiple processes reading/writing from the same DB? Are there any platform exceptions to that?
Read more >
Caught SQLite exception while vacuuming: database is ...
We are using Couchbase Lite Java SDK 2.7 and have two stand alone JAVA processes running against the same couchbase lite db and...
Read more >
File Locking And Concurrency In SQLite Version 3
The pager module makes sure changes happen all at once, that either all changes occur or none of them do, that two or...
Read more >
Best way to share sqlite database between two console ...
SQLite does support multiple concurrent connections, and therefore it can be used with a multi-threaded or multi-process application. The catch ...
Read more >
Connection String - LiteDB :: A .NET embedded NoSQL ...
LiteDB offers 2 types of connections: Direct and Shared . This affects how the engine opens the data file. ... The Shared mode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found