Architect Flow Timeout Error 504 during JMeter Load Test on WebSocket Connections

Could someone clarify why the Architect flow is timing out with a 504 Gateway Timeout when testing high-concurrency WebSocket connections from Singapore?

Running JMeter 5.6.2 from the Asia/Singapore region. The target is the Genesys Cloud platform_api. The test script simulates 100 concurrent users initiating WebRTC calls. Each user connects via WebSocket to the Architect flow endpoint. The flow is simple: it waits for a DTMF input, then routes to a queue.

The JMeter config uses HTTP Request samplers for the WebSocket handshake. Thread group is set to 100 threads, ramp-up time 10 seconds, loop count 1. The script holds the connection open for 30 seconds to simulate a live call. After 10 seconds, the flow starts returning 504 errors on the WebSocket connection. The Architect logs show the flow is still active, but the client side gets disconnected.

The error message in the browser console is: WebSocket connection to ‘wss://api.mypurecloud.com/v2/analytics/conversations/websocket’ failed: net::ERR_CONNECTION_TIMED_OUT. The Genesys Cloud API returns a 504 status code in the WebSocket close frame. This happens consistently when concurrency exceeds 50 users. Below 50 users, the test runs fine.

The platform_api rate limits are not being hit. The WebSocket connection limits are not being hit. The issue seems to be related to how the Architect flow handles concurrent WebSocket connections. The flow is not complex, just a wait and route. The timeout happens before any DTMF input is received.

Is there a specific setting in the Architect flow or the Genesys Cloud platform_api that limits concurrent WebSocket connections per flow? Or is this a limitation of the JMeter test setup? The goal is to validate the platform’s capacity for high-concurrency WebRTC calls. The current setup is not achieving the desired load. Any insights into the 504 error under load would be helpful. The environment is Genesys Cloud version 2024.1.