Getting emails about hitting Pusher usage limits even if the stats in the backend says otherwise

StackOverflow https://stackoverflow.com/questions/21126511

  •  28-09-2022
  •  | 
  •  

Question

I have been getting emails about my account having hit Pusher usage limits even if I haven't really gotten anywhere close to the limits based on my account stats.

I have searched the internet for clarifications and possible solutions. I only found this.

http://pusher.tenderapp.com/kb/faq-common-requests/half-open-connections-lead-to-temporarily-incorrect-connection-counts-and-webhook-call-delays

I have tried to manually close connections on page unload but it still seem to cause some problems still.

Any alternative solutions? What is this "ping/pong mechanism for detecting half-open connections" solution?

Was it helpful?

Solution

I used to work on Pusher support and from my time there I know that sometime the stats don't show the spikes in connections, if those spikes are very short lived. You may be able to see them if you zoom into the usage stats in the Pusher dashboard for your app.

The FAQ on half-open connections is the correct one to look at and is potentially the cause of some of your problems.

The ping/pong mechanism you mention is Pusher's solution to this problem. The WebSocket protocol defines this mechanism, see: http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#ping-and-pong-frames

However, not all clients have implemented this so Pusher have added their own ping/pong solution to their protocol: http://pusher.com/docs/pusher_protocol#ping-pong

I don't believe there is anything that you can do to stop these problems occurring, it's a networking issue where closed connections aren't being detected by the server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top