Closed Perry89 closed 4 years ago
So you are encountering this exception? If so, it means that the maximum number of Databases has been reached.
When opening the environment, you should set LightningEnvironment.MaxDatabases
to something higher.
using (var env = new LightningEnvironment("pathtofolder"))
{
env.MaxDatabases = 100; // <-- set this to something high
env.Open();
//do things here
}
Thank you for the reply!
By maximum number of databases, you mean an actual amount of databases locally? or amount of tables? If first than I only have 1 database.
LMDB terminology is kinda weird. A LMDB "Database" is what most people would call a table (A list of key/value records) A LMDB "Environment" is what most people would call a Database (A collection of "Tables")
LMDB has the ability to limit the number of databases in an environment. Hosting a "very high" number of DBs in a single environment can have a performance impact (more memory usage), but in general you don't need to worry about it.
OMG that explain it. Thank you for your help, we do indeed have a lot of tables.
Hi guys,
NativeMethods.ExecuteHelper (System.Func
2[T,TResult] action, System.Func
2[T,TResult] shouldThrow) LightningDB.LightningException: MDB_DBS_FULL: Environment maxdbs limit reachedI've had that issue for a while. I thought initally that it has something to do with dabase running out of space and not expanding itself, but that is not the case. I am using package in Xamarin.Forms project.