top | item 44982038

(no title)

h4kor | 6 months ago

The main reason I use postgres instead of SQLite is that I have multiple processes accessing the database, often 1 web service for API/Website and a worker running in the background doing heavy tasks (e.g. image processing). Both need access to the database and SQLite will run into locking issues.

How do you overcome this with SQLite and Django?

discuss

order

mrklol|6 months ago

Afaik the fix for that is to have multiple read only connections and one write only connection.

Sammi|6 months ago

Yes by enabling the write ahead log feature: https://sqlite.org/wal.html

It's on by default in many sqlite drivers because it really is the best default. But it isn't on by default in upstream sqlite even though it's been out for ages now.