[odb-users] SQLITE unable to open db multiple threads

Sum, Eric B eric.b.sum at lmco.com
Mon Aug 6 09:09:29 EDT 2012


Hi,

I am persisting objects into a sqlite database from multiple threads.  However, I am getting odd results caught with odb exceptions.  I get sqlite error 14: unable to open database multiple times throughout the execution of my program, and only a fraction of the objects persisted are present in the database.  I assume I am getting this error because one of the threads is unable to establish a connection to the database.  I am aware that you are unable to do concurrent writes to the sqlite database due to its exclusive locking mechanism, but I thought that there would be some scheduling/blocking scheme used inherently by odb to schedule the order of the persists from the different threads.    How do I fix this?  Any ideas on why I am getting this error?

Thanks,
Eric


More information about the odb-users mailing list