Exercise 2: Why a Bigger Pool Can Make a Leak Worse — Possible Solution ==================================================================== WHY IT DOESN'T FIX A LEAK ------------------------------ Per this chapter's warn-box, "if the real cause is a leak or a slow query instead, a bigger pool doesn't fix anything - the same misbehaving query eventually exhausts the larger pool too, just after a slightly longer delay." A leak or a persistently slow query will keep holding connections regardless of how many total connections exist - a bigger pool just takes somewhat longer to fill up with the same misbehaving requests, not indefinitely longer. WHY IT CAN ACTIVELY MAKE THINGS WORSE ------------------------------ Per this chapter, "a larger pool means more simultaneous connections the database itself has to serve, adding real load to a server that might already be struggling with the slow query in the first place." Each additional connection in the pool represents real, additional load capacity the database server has to be able to handle - increasing pool size increases the ceiling on how much simultaneous load can be thrown at a database that may already be under strain from the very query causing the original problem. WHY THIS ONLY HELPS THE OTHER CAUSE ------------------------------ A bigger pool genuinely does help if the cause is real capacity shortage (many short, legitimate connections exceeding a too-small pool) - in that case more capacity directly addresses more demand. It only fails to help - and actively risks harm - specifically when the cause is a small number of connections held too long, which is exactly why this chapter emphasizes checking hold time first, before reaching for a pool-size increase as the fix. WHY THIS WORKS AS AN ANSWER ------------------------------ It explains both why increasing pool size fails to solve a leak (the same misbehaving query still holds connections) and why it can make things actively worse (added real database load), rather than treating "doesn't fix it" as the whole answer.