Skip to content
Ameen Abozaid
Planned lessonMID-017-L05

Demo: pool exhaustion under load

  • Lesson 5 of 5
  • Mid-level
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

  1. Run Shop with pool size 5 and a load test of 100 concurrent users on checkout.
  2. Watch metrics: hikaricp_connections_active at max, pending growing, latencies climbing, then timeout errors.
  3. Take a thread dump and find threads waiting in getConnection and the holders inside a slow remote call.
  4. Planned mistake: raise the pool to 200 to "fix" it; database CPU saturates and latency does not improve. Revert.
  5. Real fix: move the remote call out of the transaction; reduce hold time; right-size the pool.
  6. 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.