The last time our production database ran out of connections, an AI assistant gave me the exact advice you would find in any standard system design textbook: increase the connection pool size.
On paper, that sounds completely reasonable. In reality, we had tried that exact configuration change a few months earlier, and it turned a minor bottleneck into a full-blown outage. Raising the pool ceiling at the application layer caused our services to slam directly into the database's hard connection limit, throttling queries across the entire stack and slowing every downstream microservice to a crawl. The actual root cause had nothing to do with pool sizing—it was a rogue nightly reconciliation job holding connections open indefinitely because it lacked an explicit timeout.
The AI assistant wasn't broken, and its reasoning wasn't flawed in a vacuum. Raising the pool limit is textbook advice.…