Skip to content

Loading…

Client loses connection upon ping/pong #74

Closed
masterkain opened this Issue · 5 comments

3 participants

@masterkain

Hello,
I recall some time ago that @stevegraham introduced support for ping/pong.

I was trying to investigate why browsers would lose connection to the push server exactly every minute.

Chrome and Firefox are reconnecting almost instantly, Internet Explorer errors out and won't reconnect.

I had HAProxy in front first and then moved to a dedicated Nginx (with tcp proxy support) instance, in the hope to mitigate this issue, but it remains the same. If I connect to the slanger instance directly the problem is not there.

However it turns out to be the ping/pong mechanism that makes the client disconnect when slanger is behind haproxy/nginx/whatever. I'm not still entirely sure what's up with that, but any other push message works perfectly.

Is there something particular about those ping/pong messages that I should be looking for?
Thanks.

@stevegraham
Owner

Hey Claudio,

Can you share your setup including any configuration so I can try to replicate, debug, and resolve?

Cheers

@masterkain

Sure, the setup requires an EC2 instance (micro free tier works) and it's very easy. I can provide the small nginx config file and the two nginx deb package required, can you ping masterkain@gmail.com please or I'm kain on freenode.

Thanks.

@masterkain

the problem can also be observed by leaving slanger on an instance behind a simple elastic load balancer with TCP protocol.

Set Slanger to start on 5011 and map the load balancer from 80 (tcp) to 5011 (tcp). Every ping the client receives it will disconnect.

@Juanmcuello

#124 should have already fixed this. The server was not responding with a pong message after receiving a ping. Most likely that was the problem.

@stevegraham
Owner

Closing this. Reopen if still a problem with latest code on master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.