using SQLite in Django in production?

后端 未结 6 696
温柔的废话
温柔的废话 2020-12-05 17:55

Sorry for this question, I dont know if i\'ve understood the concept, but SQLite is Serverless, this means the database in in a local machine, and it\'s stored in one file,

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 18:02

    SQLite isn't really meant for production. It's quite easy to get MySQL or PostgreSQL up and running, even on Windows, and have a real database.

    The real problem is that SQLite3 isn't threaded in Django so only one PAGE view can happen at a time on your server, see this bug https://code.djangoproject.com/ticket/12118

    I don't use SQLite3 even in development.

    EDIT: I keep getting downvoted here but the Django documentation itself recommended not using SQLite3 in Production at the time I wrote this answer. The documentation still contains the following caveat:

    SQLite provides an excellent development alternative for applications that are predominantly read-only or require a smaller installation footprint.

    If you do not have a small foot print/read-only Django instance, do NOT use SQLite3. Feel free to continue to downvote this answer.

提交回复
热议问题