3 ms·
Is there a similar effort for Django? Django Sqlite driver is slow and not tested for production.
by aitchnyu 3y ago
Is there a similar effort for Django? Django Sqlite driver is slow and not tested for production.
- infamia 3y agoSetting SQLite PRAGMAs via Django settings was recently merged. I would expect to see this show up in the next version or two of Django. https://code.djangoproject.com/ticket/24018 https://code.djangoproject.com/ticket/24018 With the proper PRAGMAs set and modern hardware, you can do 400+ writes/sec with 4 uvicorn workers and ~100 clients connected. The achilles heal is writing lots of large files. That will cause concurrent requests to wait around for the disk to finish writing to the WAL.
- frodowtf 3y agoIt also seems to have the same concurrency issues as described in the article. At least from my experience the "database is locked" error appears quite often.
- hnfong 3y agoA rather late reply, but in case anyone is reading this.... Django is basically designed to have sqlite deadlocks, and there's a trivial fix (that the dev team refused to include) that allows fixes the problem and allows you to run up to moderate loads. https://centraltrunks.blogspot.com/2022/07/django-sqlite-database-is-locked-errors.html https://centraltrunks.blogspot.com/2022/07/django-sqlite-dat... https://code.djangoproject.com/ticket/29280 https://code.djangoproject.com/ticket/29280 (I authored the rant in the first link)