-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]Maximum number of transactions reached #1772
Comments
@5d2 I could not reproduce the issue. What .NET implementation are you using? Could you provide a complete sample code that I could use to reproduce the issue? |
In case this could help, I can report having experienced the following (with LiteDB 5.0.9): Following some fairly heavy load, the following error error occurred:
when calling After having thrown that error for a while, LiteDB started giving off error messages like
until finally settling on
until the process was stopped. |
I have the same problem and I am using v5.0.9 so the bug hasn't been fixed. This is what triggers this exception: ((LiteCollection)MyDB.NoSqlDB.GetCollection("Frm")).FindOne(p => p.Id == ID); Where POCOFrm is a very simple POCO class with four properties, two are of type string and two are of type int. |
Got another "Maximum number of transactions reached" bug when my program run the following statement: LiteDB.IBsonDataReader reader = MyDB.NoSqlDB.Execute($"SELECT _id FROM Ctl ORDER BY _id DESC LIMIT 1"); |
I encountered the same exception, which was caused by the heavy use of threads within Parallel.ForEach. Unfortunately, the TransactionService for a closed thread will not be removed from the _transactions dictionary within the TransactionMonitor. |
… closed thread was not be removed from the _transactions dictionary within the TransactionMonitor. Therefore a finalizer for the TransactionService was added, which takes care of removing the transaction from the _transactions dictionary.
Hi @frankneumann , thanks for solving this. Can you submit a Pull Request about this bugfix? |
It is here: |
Fixed issue #1772: Unfortunately, the TransactionService for a closed…
@mbdavid @frankneumann My company needs this fix, do you know when it will be released and what version? |
It is fixed in the latest release. |
… closed thread was not be removed from the _transactions dictionary within the TransactionMonitor. Therefore a finalizer for the TransactionService was added, which takes care of removing the transaction from the _transactions dictionary.
V5.08
Exception Maximum number of transactions reached
CODE
var col = _db.GetCollection<T>(typeof(T).Name); result = col.Find(bse).ToList();
var col = _db.GetCollection<T>(typeof(T).Name); t = col.FindById(new ObjectId(Id)) :
The text was updated successfully, but these errors were encountered: