You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.