Closed ralyodio closed 2 years ago
Id suggest moving the database reads for your use facing app into a worker; this way your app can keep handling requests and you can simply queue up multiple reads to your worker.
This would work if your long running process finishes within an acceptable time for your app to be responsive again; otherwise there is not much you can do (other than maybe chunking your very long running expensive query into multiple smaller queries)
Got an example of this?
also why doesn't the pragma "busy_timeout" work?
I have multiple processes writing to sqlite db simultaneously.
I tried setting
PRAGMA busy_timeout = 30000
but that didn't fix my problem.I have one long running process that queries db sequentially in a loop and if I run that, the whole app freezes and users can no long read from db.
I read something about creating an sqlite_busy_handler. Does anyone know how to solve this issue?