How one hanging API takes down a whole Spring Boot app
We pointed a Spring Boot app at a partner API that never answers. Defaults: offline in 10 seconds, no recovery. Timeouts fixed it; virtual threads and Apache HttpClient each had a surprise.
Tested write-ups on the problems that surface once software meets production: what breaks, why, and the fix, with the code and the numbers.
We pointed a Spring Boot app at a partner API that never answers. Defaults: offline in 10 seconds, no recovery. Timeouts fixed it; virtual threads and Apache HttpClient each had a surprise.
Add a second instance and every @Scheduled job runs twice. We counted the duplicates across six setups: ShedLock fixes it, but only with two settings that are easy to get wrong.
Spring, Quartz and JobRunr ran the same job every minute, and JobRunr quietly lost a run. The log line that gave it away, the gap behind it and the 5.2.0 fix.
Bids pile up in the last seconds, and a once-a-minute sweep closes auctions late. The pattern we recommend: the deadline in the bid transaction, one Cloud Task per auction and an idempotent close.