Skip to content

v2.4.1

Choose a tag to compare

@github-actions github-actions released this 08 May 12:06
· 82 commits to main since this release
v2.4.1 — fix listener handler stalling under load (WAL + async UA)

Recurring symptom: HTTPS goes unresponsive after burst listener
connects. Login UI hangs, /healthz times out, CLOSE_WAIT
accumulates. Journal showed /relay/history.go:126 INSERT INTO
user_agents serialising at >1 s each.

Root cause: synchronous RecordUA on the listener/source connect
hot path + SQLite default rollback-journal/full-fsync. Every
listener connect blocked the handler for the duration of a full-
file fsync; bursts queued behind the write lock; login (which
also touches the DB) waited behind them.

Fix:
  - PRAGMA journal_mode=WAL + synchronous=NORMAL + busy_timeout=5000
    on the history DB connection. Writers no longer fsync the
    whole file; per-write latency drops ~200x.
  - RecordUA now runs its INSERT in a fire-and-forget goroutine
    so the listener / source handler returns immediately.