We’re seeing sporadic 502 Bad Gateway errors when using the Genesys Cloud Java SDK for high-volume Data Action calls. The stack trace points to a ThreadLocal leak in the ApiClient connection pool. We’ve tried setting maxConnections to 200, but the threads keep stacking up.
client.getHttpClient().setMaxConnections(200);
client.getHttpClient().setConnectionTimeout(5000);
Is there a specific way to flush the context between requests?