There is one database file in which several tables (4-5). It is rarely accessed (approximately 1 per minute and an endless loop that calls to it every 5 seconds).
So, everything works fine, but sometimes the error sqlite3.OperationalError: database is locked comes sqlite3.OperationalError: database is locked (and with data scaling I’m afraid I’ll crawl out more often)
How can I solve this problem? (something like waiting until the DB is free)
As an option for now: create several database files for a small load distribution (but this does not help much since all the tables are interconnected).
The script is located on a vps server with 512 MB of RAM, 10 GB of SD (100 MB / s) and 1 2.4 GHz core (can it switch to some other type of postgresql subd?)