ops: schedule session reaping — tower-sessions DeletionTask is never spawned, so sessions grow unbounded #159
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier#159
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during an operational-resilience review (Release It! stability rules).
Location:
crates/infra/src/session_store.rs:129(delete_expiredimpl); no caller incrates/server/src/main.rsSeverity: High — unbounded growth (Steady State)
Problem
The session store implements
tower-sessions' expired-deletion hook, but the accompanyingDeletionTaskis never spawned at startup. Nothing ever calls the reaper, so expired session rows are never removed. Thesessionstable grows without bound for the life of the deployment; on the "small box, runs for years" target this steadily inflates DB size, query cost, and WAL pressure until the whole app degrades — with no dependency having failed.This is the classic Steady-State violation: a mechanism that accumulates a resource (session rows) has no matching mechanism that reclaims it.
Suggested fix
Spawn
tower-sessions' continuous deletion task at startup (e.g.session_store.continuously_delete_expired(period)) as a supervised background task, and drain it on graceful shutdown alongside the server and worker monitor.