Ask HN: Do you know any companies that use Django and SQLite in production?

5 points by piyiotisk ↗ HN

3 comments

[ 6.1 ms ] story [ 19.1 ms ] thread
We do at ArchiveBox.io. We've had some minor issues with multiple processes trying to do long write transactions at once (SQLite can only handle one writer at a time), but other than that, no regrets.

I planned to support PostgreSQL initially but as time goes on I yearn for it less and less. It's greatly simplified the web stack by not needing an init system to spin up a DB/redis/etc, and it allows people to get started with a simple `pip install archivebox`, which is one of the main selling points of the project.

That problem should be easily solvable by activating the WAL mode: https://www.sqlite.org/wal.html. Also make sure to set busy timeout to something > 0 (e.g. 5000 = 5 seconds). This will let the database simply try again with a backoff if the database is currently busy (which usually only spans a few milliseconds anyways). This solved many production problems for me.
Tons of them, why? Lots of QNAP apps are written in python, django, and use sqlite.