This KB article is relevant if:
- You are using channel existence WebHooks, you disconnect a client, the channel should be vacated but you don't see the channel_vacated WebHook for some time
- You are using presence WebHooks, you disconnect a client and expect amember_removed WebHook but don't receive one for some time
- Your application connection count is higher than expected after disconnecting users
Sometimes it's possible for a connection between a client to Pusher to only disconnect at the client side. This leads to something called a half-open connection. To work around this we have implemented a timeout where we detect half-open connections through lack of activity over a connection.
The timeout for inactive connections in Pusher is 200 seconds. After the 200 seconds a ping is sent and if a pong is not received within 30 seconds then the connection is cleaned up. This means that Pusher can indicate a connection is open for up to 230 seconds before cleaning up. This means that a connection count can be incorrect for this amount of time or the an expected WebHook call can be delayed for this amount of time.
What should I do to reduce the chances of this happening?
Article also available here in the knowledge base.