Hi,

My application's architecture looks roughly like this:

- A main thread which does only database reads
- A dedicated database write thread

I needed to create this because while reads are fast, there are occasions where writes take a significant portion of time and that can cause the main thread to lock up, which results in a sub-par user experience.

The problem I am having is that somewhere in the main thread, something is grabbing a shared lock on the SQLite DB and not letting go. the effect of this is that the dedicated write thread ends up waiting until the application exits(!) in order to do some writes that occur after this.

I've tried debugging manually, disabling various features but I haven't been able to pinpoint which bit actually grabs the lock. Are there any debugging strategies I can employ to get to the bottom of it?

My current journal_mode is DELETE but WAL has similar problems, in that the database writes are not seen, presumably because some reader has an open transaction somewhere.

Thanks for your help.

Sohail

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to