← Back to context

Comment by aitchnyu

2 years ago

Is there a similar effort for Django? Django Sqlite driver is slow and not tested for production.

Setting 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

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.

It 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.