Websockets - disconnect after 1 mintue

I got a situation where I need to connect with rabbitmq over web sockets through apigee.

my setup is like: mqtt client -> apigee -> rabbitmq, (mqtt connects with web sockets)

 

In the first ~60 seconds everything works, after that the connection just quits.

extra details:

1. I send a message every 20 seconds on the socket

2. The mqtt client is configured to send a keep alive message every 30 seconds

3. By disconnects I mean that the rabbitmq subscribers (in the client) stops receiving messages

 

some things I checked:

1. If I remove the apigee  from the chain (meaning, client -> rabbitmq) then everything works as expected, so I'm pretty sure it's something to do with apigee

2. If I add "keepalive.timeout.millis" or "io.timeout.millis" to TargetEndpoint then the response apigee gets is "400 Bad Request" (no logs in rabbitmq)

 

I'd love any idea regrading this,

thx 🙂

0 1 1,075
1 REPLY 1

Hi ofir,

I observed the same behavior using a GLB with a MIG of proxy VMs - closed connection after 60 seconds.

Here are my other observations:

  • I adjusted the Properties on the TargetEndpoint but that had no affect.
<HTTPTargetConnection>
    <Properties>
        <Property name="api.timeout">120000</Property>
        <Property name="io.timeout.millis">180000</Property>
    </Properties>
    <URL>wss://demo.piesocket.com/v3/channel_1?api_key=my_key&amp;notify_self</URL>
</HTTPTargetConnection>
  • I ran my client on a local VM in my customer project connecting directly to the Apigee X ILB IP address and it ran there indefinitely - no timeout!
  • I adjusted the timeout on the GLB backend to 600 seconds and it ran for 10 minutes!
gcloud compute backend-services list
gcloud compute backend-services update apigee-proxy-backend --global --timeout=600
  • Finally I ran my client on an install with a GLB using a NEG (released 3/31) as the backend - no timeout!

Hope that helps and gives you options.

References: