WebSocket disconnects with timeout

I am seeing this interesting situation using websockets, specifically with Absinthe.GraphqlWS.Socket, where I see a lot of calls to the terminate/2 callback with reason :timeout.

I have taken every precaution to avoid this:

  1. The absinthe_graphql_ws library itself is sending keepalives every 30 seconds
  2. My clients also send keepalives every 30 seconds as well
  3. The socket is configured with option timeout: 65_000 (65 second timeout)
  4. My load balancer has a timeout of 60 seconds (i.e. twice larger than the ping frequency)

I am suspecting something outside of Phoenix or Cowboy (e.g. client or infra), but has anyone here seen this before?

I’m on Phoenix 1.6.16 and Cowboy 2.10.