I have developed a small web project using Django as a backend. Recently I became to face "Database is locked" errors. And their frequency is growing over time. What can be the reason for these errors?
Can I ask you what the database are you using?
I think the reason is that your website is serving more users now than the lightweight database SQLite can support. The reason for "Database is locked" error is that one thread of execution wants to access the database but another thread is already using the database. This not allows the first thread to access the database. It waits for some time, but then it is timed out. Try to migrate to the more production-fit database, for example, PostgreSQL.
Then look at the timeout parameter, maybe it is set to an extremely low duration. Or maybe there are some other issues with your architecture. Something is done with the database for a long period of time, for example. Anyway, the eventual reason is that one thread wants to access the database which is already locked by another thread. Find the reason for this situation.