Skip to content
Chaos Lab

Debug the code · lab 2 · starter · about 7 min

Product pages that wait for fraud checks

Checkout calls a fraud-check service before charging the card. At 14:02 fraud-check deployed a new version, and its answers now take about 28 seconds. Product and search pages, which never call fraud-check, start timing out too. All pages are served by the same Spring Boot service with Tomcat's default 200 threads.

  • Your fix must
  • Product page p99 under 300 ms while fraud-check is slow
  • At least 95% of checkouts complete while fraud-check is slow
  • No request holds a thread for longer than 3 seconds
Product page p9912.00 starget < 300 ms

Pager timeline

Logs and signalsReconstructed
14:02fraud-check deploy v2.31
14:04fraud-check p50 28 s
14:06Tomcat busy threads 200/200
14:07product page p99 12 s: product pages never call fraud-check
Thread dump · shop service
ThreadsStateWaiting in
196RUNNABLESocketInputStream.read ← fraud-check
4RUNNABLETomcat acceptor and pollers

Step 1 · find it

Tap the line that causes it

Mark up to 3 lines, then check.

CheckoutService.javaJava 21 · Spring Boot 3.4

No line marked yet

The code is real Spring Boot; the evidence and every patch's numbers are simulated and illustrative. Nothing runs in your browser.