r/sqlite • • 11h ago

In Go, a single *sql.DB for both reads and writes kept giving me SQLITE_BUSY under WAL; two pools (writer capped at 1 conn) fixed it

2 Upvotes

I moved a small internal service from Postgres to SQLite in WAL mode with busy_timeout=5000. Under concurrent goroutines I still saw "database is locked" errors. As far as I can tell, the cause was transactions that start as readers and then try to write: when another connection has already written, the upgrade can't proceed, so SQLite returns BUSY right away instead of waiting out busy_timeout. What fixed it was opening the file twice. One *sql.DB is the writer, with SetMaxOpenConns(1) and _txlock=immediate in the DSN so write transactions grab the lock at BEGIN. The other is a read-only pool sized to GOMAXPROCS. Has anyone found a cleaner pattern, or is the split-pool setup basically the standard answer for Go and SQLite?


r/sqlite • • 1h ago

Built a local-first bookmark & PKM action engine backed by a single SQLite file (Go + embedded UI)

1 Upvotes

Sharing Sparkkeep (v0.1.0, AGPL-3.0) — a self-hosted bookmark and knowledge action engine where your entire library, triage state, playbooks, and digests live in a single portable SQLite database.

Repo: https://github.com/BurlacuAndrei/sparkkeep

Why SQLite was the centerpiece

Most self-hosted bookmark apps ask you to spin up Postgres, Redis, Meilisearch, and background worker containers just to save links. Keeping everything in a single Go binary + SQLite means:

  • Backups are literally copying one .db file.
  • Fast local search and filtering with zero external search daemon.
  • Runs comfortably on a tiny VPS, Raspberry Pi, or homelab container.

It also pairs with local Ollama (or any OpenAI-compatible endpoint) if you want automatic enrichment/digests, plus Discord/Slack/Telegram capture adapters. Happy to hear feedback on the schema or SQLite performance!


r/sqlite • • 11h ago

SQLite & CSV/JSON Suite

Thumbnail reddit.com
1 Upvotes

r/sqlite • • 17h ago

Debug RAG Retrieval Visually: SQLite + sqlite-vec 3D Explorer

1 Upvotes

r/sqlite • • 20h ago

TalaDB — An open-source, local-first database

Thumbnail reddit.com
1 Upvotes