hermes - 💡(How to fix) Fix feat(kanban): add busy_timeout PRAGMA to prevent WAL corruption under concurrent writers

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

kanban_db.py initializes SQLite with WAL journal mode and synchronous=NORMAL, but does NOT set busy_timeout. When two processes (Gateway Dispatcher + Dashboard Plugin) attempt simultaneous writes, SQLite returns SQLITE_BUSY instead of waiting. This causes WAL journal corruption.

One-line fix verified stable over 12+ hours:

conn.execute("PRAGMA busy_timeout=10000")

Root Cause

kanban_db.py line 1182-1185 sets WAL + synchronous but no busy_timeout. Concurrent writes get immediate SQLITE_BUSY, abort mid-transaction, corrupting WAL file.

Fix Action

Fix / Workaround

kanban_db.py initializes SQLite with WAL journal mode and synchronous=NORMAL, but does NOT set busy_timeout. When two processes (Gateway Dispatcher + Dashboard Plugin) attempt simultaneous writes, SQLite returns SQLITE_BUSY instead of waiting. This causes WAL journal corruption.

Environment

  • Hermes Agent v0.14.0 (2026.5.16) on Ubuntu 24.04
  • 6 active Hermes profiles, Kanban with 30+ tasks
  • Gateway dispatcher + Dashboard Kanban plugin concurrently

Steps to Reproduce

  1. hermes kanban with dispatch_in_gateway: true, 30+ tasks
  2. hermes dashboard --tui concurrently
  3. Wait 10-30 min
  4. hermes kanban list → database disk image is malformed

Code Example

conn.execute("PRAGMA busy_timeout=10000")
RAW_BUFFERClick to expand / collapse

Summary

kanban_db.py initializes SQLite with WAL journal mode and synchronous=NORMAL, but does NOT set busy_timeout. When two processes (Gateway Dispatcher + Dashboard Plugin) attempt simultaneous writes, SQLite returns SQLITE_BUSY instead of waiting. This causes WAL journal corruption.

One-line fix verified stable over 12+ hours:

conn.execute("PRAGMA busy_timeout=10000")

Environment

  • Hermes Agent v0.14.0 (2026.5.16) on Ubuntu 24.04
  • 6 active Hermes profiles, Kanban with 30+ tasks
  • Gateway dispatcher + Dashboard Kanban plugin concurrently

Steps to Reproduce

  1. hermes kanban with dispatch_in_gateway: true, 30+ tasks
  2. hermes dashboard --tui concurrently
  3. Wait 10-30 min
  4. hermes kanban list → database disk image is malformed

Root Cause

kanban_db.py line 1182-1185 sets WAL + synchronous but no busy_timeout. Concurrent writes get immediate SQLITE_BUSY, abort mid-transaction, corrupting WAL file.

Related

  • #31618 (same corruption root)
  • #32415 (leaked decompose connections compound)
  • #32094 (quarantine hardening)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING