My configuration keeps failing… I am hitting a wall with a JMeter script designed to simulate 500 concurrent agents pulling real-time conversation analytics via WebSocket. The goal is to stress test the /api/v2/analytics/conversations endpoint under high load, mimicking a peak hour scenario for our Singapore-based contact center. I am using the Genesys Cloud Java SDK (version 12.5.0) wrapped in a JSR223 sampler to handle the WebSocket handshake and message parsing. The setup ramps up 10 threads per second over 50 seconds, targeting a total of 500 active WebSocket connections. Each connection sends a subscription request every 30 seconds to refresh the data feed.
The issue manifests around the 300th concurrent connection. Instead of receiving the expected JSON payloads, the WebSocket streams abruptly close with a 401 Unauthorized status. This is confusing because the initial handshake succeeds with a 101 Switching Protocols, and the same OAuth2 token works perfectly for single-threaded tests. I have verified that the token has not expired; it is refreshed every 55 minutes via a separate thread group. The 401 errors seem to correlate with the API gateway dropping connections when the request rate exceeds 100 requests per second per tenant. I suspect this might be related to the platform_api rate limiting behavior during WebSocket bursts, but the standard 429 Too Many Requests error is not appearing. Instead, the connection is silently terminated with an auth error, which suggests the gateway might be treating high-frequency WebSocket messages as unauthorized attempts after a certain threshold.
Has anyone encountered similar behavior when scaling WebSocket subscriptions for analytics? I am looking for best practices on handling connection pooling or backoff strategies in JMeter to avoid these sudden 401 drops. I can share the specific JMeter XML configuration and the JSR223 script logic if needed, but I want to confirm if this is a known limitation of the platform_api throughput limits for real-time data feeds before I adjust my test parameters.