OperationalError: database is locked

(Felix Kimutai) #1

Today while I was developing my app with Django I came across this error " OperationalError: database is locked " after quick research on stackoverflow I found this answer https://stackoverflow.com/questions/3172929/operationalerror-database-is-locked , it says that

If you’re getting this error, you can solve it by:

  1. Rewriting your code to reduce concurrency and ensure that database transactions are short-lived.
    Increase the default timeout value by setting the timeout database option optionoption "

  2. Switching to another database backend. At a certain point SQLite becomes too “lite” for real-world applications, and these sorts of concurrency errors indicate you’ve reached that point.

Is there an article or tips with examples on how to achieve option 1 above