question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bugfix: Retry on "database locked" error (or add support for PostgreSQL/MySQL DB backend)

See original GitHub issue

when 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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
piratecommented, Apr 12, 2022

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.

0reactions
piratecommented, Apr 12, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found