mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-05 11:08:00 +00:00
`DatabasePool` enforces `txn_limit` by counting transactions per worker thread and reconnecting the thread's connection past the limit. The Rust pool does not pin connections to threads, so that count recycled whichever connection the thread happened to check out. Give the native pool a `max_uses` instead: deadpool's recycle hook retires a connection once it has served that many checkouts, which is what `txn_limit` means to bound. `DatabasePool` skips its own counting when the pool reports that it handles the limit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ULdieJyQoHNzeHq42H2M1p