Please help me with the following situation.

I have a set of programs that use SQLite3 as a buffer (and an archive at the same time). One process (the "feeder") generates some data and puts it into an SQLite3 DB. (It opens the DB on its own, stores its own sqlite3 structure, etc.) In an asyncronous manner one, two or more separate, completely independent "reader" processes get data from the DB, do some processing and output the result.

It is to know that the feeder is running in the timer interrupt, once a second.
Nothing is passed among processes other than that they open the same DB file.

(The feeder is in C, the readers are also in C and one in Tcl; and this all runs on linux -- though I don't think it should matter much.)

However, at random times I keep getting "library routine called out of sequence" errors (in the feeder). Now I'm at my wits end. (In a longer run it happened without the readers running at all. The feeder opens the DB once and only ever closes before it quits on being killed.)

I think I've gone through all due diligence as per http://www.sqlite.org/cvstrac/wiki.txt?p=LibraryRoutineCalledOutOfSequence&t=1157621398. No match I can find; I do not close the DB before executing commands against it. I only use sqlite3_open(), sqlite3_exec(), and sqlite3_close(). I'm not sure a clearly understand "Trying to use the same database connection at the same instant in time from two or more threads." but as far as I think I do not use the _same_ DB connection (but connections to the same DB).

I've also read this: http://www.sqlite.org/cvstrac/wiki?p=MultiThreading -- this is the closest doc I've found to what I'm after. I compiled Sqlite3 for myself (had to ...); allowed threadsafe; no avail...

Somebody, please help!

Regards,

AZ




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to