I have a program reads data from 17 PLCs and writes it into SQLite databases 
every minutes.  Every midnight, it deletes old data and vacuums the databases.  
It's behaving strangely after that.  I think the problem begins because the 
vacuum operation is still going on at 12:01, when the next read is scheduled.  
SQlite throws a "database is locked" error.  

I tried to replicate this by writing a little program that vacuums one SQLite 
database repeatedly for three minutes.  The first time I tried to use it, the 
main program behaved as expected, showing the same odd behavior.  But the next 
two times I tried, my program sailed right through the "database is locked" 
error, running as it was designed with no problems.  

So, instead of running vacuum over and over again, I would like to do something 
that would lock my database against writing once, and then not release it for 
three minutes.  How can I do that?

Thank you very much.

RobR
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to