I'm trialling a centralised SQLite database to store process
automation metadata with a known, small, fixed number clients (around
10) as part of a Jenkins CI system running on Windows. The clients
connect occasionally and run simple, quick (sub-second) SELECT queries
and even less frequent INSERTs using Python APIs. Due to the nature of
the workflow, I'd estimate the chances of concurrent access are pretty
low, although not impossible by any means. Recently, I've started
seeing these errors related to some of the INSERT calls:

DatabaseError: database disk image is malformed
StorageError: database disk image is malformed

Given the scenario (and being familiar with
http://www.sqlite.org/whentouse.html), I suspect this almost certainly
an issue caused by concurrent writes to the database, but I'd like
some advice before move to MySQL or similar.

Would using TRANSACTIONs on the INSERTs prevent this issue? If
necessary, by combining this with a delay-retry mechanism in the
client code.

Any other tips or tricks to shore-up the robustness, or should I just
limber up my throwing arm and call for the towel?

Cheers,
Larry

P.S. just fmi, I'd also love to know -->definitively<-- if concurrent
SELECT calls would ever be an issue.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to