What’s the right way to configure the Java Platform SDK’s HTTP client to handle 50+ concurrent threads hitting the /api/v2//queues endpoint without blowing up the connection pool? We’ve got a custom dashboard service that pulls real-time queue stats every 5 seconds for 60 different queues. It works fine for the first minute, then everything hangs. No exceptions, just silent timeouts. I’m assuming the default OkHttp client settings in the GenesysCloudSdk are too conservative for this kind of load. Here’s how I’m initializing the client:
GenesysCloudSdk.init(new Configuration.Builder()
.apiVersion("v2")
.client(new OkHttpApiClient()
.connectionTimeout(10)
.readTimeout(30)
.maxIdleConnections(10) // Tried 100, no change
.keepAliveDuration(30)
)
.build());
The logs show the thread pool is stuck waiting for connections. I’ve tried increasing maxIdleConnections to 100 and bumping the timeouts, but it just delays the inevitable. The service is running in a Docker container with limited resources, so I can’t just spin up more instances. Is there a specific way to tune the connection pool size or enable connection reuse that I’m missing? The SDK docs are pretty vague on this. I need this to be thread-safe and efficient. Right now it’s a mess. We’re losing data because the requests are timing out before they even hit the server. Any ideas on how to fix this without rewriting the whole client layer?