[sqlite] Problem with locked database

2015-11-04 Thread ALBERT Aurélien
Thanks you both. I'm already using a timeout of 1 minute. My "Database is locked" errors only happen in the following situation : - I run an import thread, which does a lot of write - this thread uses a transaction : BEGIN at import start, COMMIT/ROLLBACK at import end - during the import

[sqlite] Problem with locked database

2015-11-03 Thread ALBERT Aurélien
Hi, I'm often getting the "Database is locked" error message and I don't really understand what can lead to this. I'm using these settings : - sqlite3_config(SQLITE_CONFIG_MULTITHREAD) - multiple threads - only one sqlite connection per thread - each thread have a different connection

[sqlite] Any database unique ID across multiple connections ?

2015-09-24 Thread ALBERT Aurélien
@ Stephan Beal "Every instance of a :memory: db is a unique instance, so you cannot have multiple connections to a single :memory: db." >> I know, this is one of the various reasons that made my solution not really >> ideal @ Simon Slavin "There's a PRAGMA for storing and retrieving a

[sqlite] Any database unique ID across multiple connections ?

2015-09-24 Thread ALBERT Aurélien
Hi, I'm using SQLite C API and my application use multiple databases, each database having multiple connections. I need to identify which connection use the same database as another connection. For the moment, I use the absolute database filename as an "unique database identifier", and I

[sqlite] SQLite in multi-thread application

2015-07-03 Thread ALBERT Aurélien
Hi, I'm using SQLite v3.8.8.3 in my muli-threaded application. SQLite is configured so these asserts are satisfied : assert(sqlite3_threadsafe() > 0); assert(sqlite3_config(SQLITE_CONFIG_MULTITHREAD) == SQLITE_OK); I have multiple connections to the same database file : -