Java Virtual Threads: Spring Boot 3 & JDBC Connection Pools

It was 3:14 AM on a bitterly cold Sunday in November. PagerDuty was screaming, the Slack war room was silent except for the frantic clatter of keyboards, and our primary order-processing service was quietly, methodically setting itself on fire. We were running a classic Spring Boot 2.7 monolith backed by a multi-tenant PostgreSQL cluster. The … Read more

Java Virtual Threads: Scheduling Anomalies & Tuning

03:14:00 UTC. PagerDuty is screaming again. The latency on `com.acme.financial.riskEngine.processor` has flatlined the dashboard, dragging the 99th percentile tail latency from a respectable twelve milliseconds to a terrifying four thousand two hundred. We migrated the entire ingress tier to java virtual threads last week, confident we were escaping the tyranny of platform thread starvation. We … Read more

Benchmarking Java 21: Virtual Threads Latency Deep Dive

Post-Mortem: Socket Exhauster on Node 04 java.lang.OutOfMemoryError: Thread creation failed: Operating system resource exhausted at java.base/java.lang.Thread.start(Thread.java:1539) at java.base/java.lang.VirtualThread.start(VirtualThread.java:307) at com.fintech.ledger.io.SocketWorkerPool.dispatch(SocketWorkerPool.java:88) at com.fintech.ledger.GatewayServer.lambda$acceptConnections$3(GatewayServer.java:142) at java.base/jdk.internal.vm.Continuation.enter(Continuation.java:340) … Caused by: java.io.UncheckedIOException: java.net.SocketException: Too many open files at com.fintech.ledger.io.NativeEpollDispatcher.register(NativeEpollDispatcher.java:211) It pinned. Hard. After three days of staring at raw kernel-bypass logs on Node 04, watching p99.9 latencies blow past … Read more