WebSocket disconnection in Apigee X

We are observing that our WebSocket connection through Apigee X is getting disconnected automatically after approximately 1 minute of inactivity.

When we connect directly to the backend WebSocket service (bypassing Apigee), the connection remains active for over 10 minutes without any issues. However, when the same backend is accessed through Apigee X, the connection drops after being idle for about 57 seconds.

We have already verified the following configurations:

  • Backend (target) timeout is set to 302 seconds.

  • Apigee X properties:

    • api.timeout = 120000

    • io.timeout.millis = 180000

Despite these settings, the disconnection still happens after 1 minute of inactivity.

We would like to confirm:

  1. Is there an idle timeout setting for WebSocket connections within Apigee X or its underlying load balancer (GLB / XLB)?

  2. If yes, how can we increase or configure it beyond 1 minute?

  3. Are there any known limitations on WebSocket idle connection duration when proxied via Apigee X?

Thanks :slightly_smiling_face:

Hello @Peeyush_Singhai,

If I were to guess, you are hitting a timeout before the underlying Apigee proxy logic to/through your web-socket service. Have you verified the timeout settings as a part of your Apigee GXLB - you should be able to update as discussed here: gcloud compute backend-services update  |  Google Cloud SDK

Given the above, the limitation is more likely then not a default settings in your ingress points more then anything else - let me know what you think!