hermes - 💡(How to fix) Fix Bug: embedded Kanban dispatcher still leaks sqlite/WAL file descriptors after #28301

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…

Even with the #28301 fix present, the gateway-embedded Kanban dispatcher still appears to leak file descriptors on successful board ticks.

This seems different from #28285:

  • #28285 / #28301 fixed the case where kanban_db.connect() raised during initialization and the connection was never closed.
  • This remaining issue shows steady fd growth without requiring an init failure on each tick.
  • The leaked descriptors are mainly repeated kanban.db and kanban.db-wal handles.

Error Message

Example fd samples:

Root Cause

Even with the #28301 fix present, the gateway-embedded Kanban dispatcher still appears to leak file descriptors on successful board ticks.

This seems different from #28285:

  • #28285 / #28301 fixed the case where kanban_db.connect() raised during initialization and the connection was never closed.
  • This remaining issue shows steady fd growth without requiring an init failure on each tick.
  • The leaked descriptors are mainly repeated kanban.db and kanban.db-wal handles.

Fix Action

Temporary workaround

Disable embedded dispatch:

kanban:
  dispatch_in_gateway: false

This is the only reliable mitigation found so far.

Code Example

kanban:
  dispatch_in_gateway: true
  dispatch_interval_seconds: 60

---

kanban:
  dispatch_in_gateway: false

---

t+0m  212
t+1m  224
t+2m  236
t+3m  248
t+4m  260
t+5m  272

---

sqlite3.OperationalError: unable to open database file
[Errno 24] Too many open files
Channel directory: failed to write: [Errno 24] Too many open files
Failed to send message: Cannot connect to host ... [Too many open files]

---

kanban:
  dispatch_in_gateway: false
RAW_BUFFERClick to expand / collapse

Summary

Even with the #28301 fix present, the gateway-embedded Kanban dispatcher still appears to leak file descriptors on successful board ticks.

This seems different from #28285:

  • #28285 / #28301 fixed the case where kanban_db.connect() raised during initialization and the connection was never closed.
  • This remaining issue shows steady fd growth without requiring an init failure on each tick.
  • The leaked descriptors are mainly repeated kanban.db and kanban.db-wal handles.

Environment

  • Hermes Agent 0.14.0
  • Reproduced on current main
  • Linux
  • Gateway running as services

Minimal repro

Leave exactly one profile with:

kanban:
  dispatch_in_gateway: true
  dispatch_interval_seconds: 60

Set other profiles to:

kanban:
  dispatch_in_gateway: false

Restart gateways, then sample fd count on the sole dispatcher host once per minute.

Observed behavior

Example fd samples:

t+0m  212
t+1m  224
t+2m  236
t+3m  248
t+4m  260
t+5m  272

This is a stable +12 fd / minute slope.

The repeated fd targets are mainly:

  • kanban.db
  • per-board kanban.db
  • matching kanban.db-wal

Expected behavior

With only one embedded dispatcher host, fd count should stay roughly stable.

Actual behavior

The sole dispatcher host keeps accumulating kanban.db / kanban.db-wal descriptors every dispatch interval until it eventually hits fd exhaustion.

Failure symptoms after enough accumulation

sqlite3.OperationalError: unable to open database file
[Errno 24] Too many open files
Channel directory: failed to write: [Errno 24] Too many open files
Failed to send message: Cannot connect to host ... [Too many open files]

Temporary workaround

Disable embedded dispatch:

kanban:
  dispatch_in_gateway: false

This is the only reliable mitigation found so far.

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…

FAQ

Temporary workaround

Disable embedded dispatch:

kanban:
  dispatch_in_gateway: false

This is the only reliable mitigation found so far.

Expected behavior

With only one embedded dispatcher host, fd count should stay roughly stable.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Bug: embedded Kanban dispatcher still leaks sqlite/WAL file descriptors after #28301