ops: bound the apalis job-store pool — no acquire/busy timeout or connection cap #162
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#162
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/jobs/mod.rs:55Severity: Medium — unbounded wait (Timeouts)
Problem
The apalis job-store pool is built with
SqlitePoolOptions::new().connect()— no acquire timeout, nobusy_timeout, and nomax_connectionscap. This is the one integration point in the system with an unbounded wait: a worker acquiring a connection can block indefinitely under contention. The app pool (crates/infra/src/repositories/sqlite.rs:44) already gets a 3s acquire timeout, a 5s busy timeout, and a 10-connection cap; the job pool gets none of it.Because this pool backs the background queue rather than the request path, a stall delays jobs rather than downing the server — but it is a genuine unbounded-wait gap that should be closed.
Suggested fix
Give the job-store pool the same bounds as the app pool: an acquire timeout, a
busy_timeoutpragma, and amax_connectionscap.