PgLockRegistry exhausts connection pool — one connection per lock #171
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#171
Loading…
Add table
Add a link
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?
Problem
Each Acquire() grabs a dedicated connection from the pool and holds it for the lock lifetime. With many subscriptions/automations, this exhausts the pool.
Real-world: YoYoPass server stuck on startup — 38 subscriptions each holding a connection.
Fix
Single shared connection holds all locks (advisory locks are session-scoped). Refcount tracks held locks. Connection released when last lock released. Close() for clean shutdown.