Bugfix: Retry on "database locked" error (or add support for PostgreSQL/MySQL DB backend)
See original GitHub issuewhen using the documented method to add or update links in parallel ,
or using the gui while updating on the cli ,
plenty of database locked
errors ,
and since the somehow lengthy ( min. 500ms per page only to check , up to 6*120 s with timeout 2m )
a simple RETRY_DB_WRITE
variable and the corresponding code would help
(or just switch to SQL , since it is way faster , especially when running 20Mbyte+ sqlite files from SD/MMC )
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
OperationalError: database is locked - python - Stack Overflow
OperationalError: database is locked errors indicate that your application is experiencing more concurrency than sqlite can handle in default ...
Read more >Set up a Database Backend - Apache Airflow
Choosing database backend¶. If you want to take a real test drive of Airflow, you should consider setting up a database backend to...
Read more >Release notes & updates – Azure CLI - Microsoft Learn
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >FAQ - GnuCash GIT, Wiki, and Email List/Archive Server
3 Q: Is the Postgres DB / SQL backend supported? 3.7.4 Q: Can I open my GnuCash SQL database with another program, perhaps...
Read more >Release History Of SQLite
Add support for compiling SQLite to WASM and running it in web ... This bug fix could, in theory, cause problems for legacy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note I’ve added a new DB/filesystem troubleshooting area to the wiki that may help people arriving here from Google: https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives#database-troubleshooting
Contributions/suggestions welcome there.
While Postgres is better at concurrent writes (not necessarily reads), it’s definitely not a clearcut winner on “better at maintainability and security”. Postgres is significantly less tested than SQLite. I think you forget that Airbus planes, rockets, boats, most iOS apps and other native apps, and tons of modern critical infrastructure run on SQLite!
We might add Postgres/MySQL support in the future, but it’s not a priority because ArchiveBox is focused on long-term data format durability above all else, and SQLite is the clear winner in that regard, having been standardized to the point of wide adoption far beyond Postgres and MySQL and others. Side note, I love Postgres, but honestly MySQL is slightly better for the ArchiveBox use-case, InnoDB compression is better, and it can handle many more concurrent threads than Postgres with lower resource usage on smaller machines/containers.
I’m hesitant to link you to the docs on changing the database unless you’re already experienced at doing that with Django and can handle any bugs that come up on your own, because I’m not ready to provide support for people running other databases, it’s just to much extra work for a solo-maintainer/free-time project.