mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-17 22:21:26 +01:00
Two changes that go together, because the first is untestable without the second. `max_size` goes 20 → 50. The comment justifying 20 was out of date: it cited the 256 open-file soft limit macOS gives GUI apps, but `run()` has since called `rlimit::increase_nofile_limit(10240)` before any pool is opened, so the ceiling it was sized against is gone. 50 WAL connections is roughly 150 descriptors against 10240, and only `min_idle` is opened up front — r2d2 creates the rest on demand — so the idle cost is unchanged. The comment now says what actually bounds the number: commands nest a couple of connections each, and since #542 every frontend command dispatches as its own task, so they arrive together. On its own that is a guess with no way to check itself. A pool that cannot hand out a connection fails with `Error(None)` and nothing else, whether every connection is checked out or none could be opened — unrelated problems with identical symptoms, and raising the ceiling only helps the first. So both pools now acquire through one helper that times the wait, warns past a second, and folds the pool's state into `Error::PoolTimeout`. The error a command returns now says which failure it was, which is what the next report needs to be worth anything. Blob pool sizing is untouched; nothing points at it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>