Demo: pool exhaustion under load
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
reproduce exhaustion, diagnose it, and fix the cause.
Draft outline details
Step by step
- Run Shop with pool size 5 and a load test of 100 concurrent users on checkout.
- Watch metrics:
hikaricp_connections_activeat max,pendinggrowing, latencies climbing, then timeout errors. - Take a thread dump and find threads waiting in
getConnectionand the holders inside a slow remote call. - Planned mistake: raise the pool to 200 to "fix" it; database CPU saturates and latency does not improve. Revert.
- Real fix: move the remote call out of the transaction; reduce hold time; right-size the pool.
- Re-run the load test and compare.
Prepares MID-017-LAB1.
Check your understanding
What was the real cause of exhaustion?
Show answer
Connections held during a slow call inside a transaction.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.