Client loses connection upon ping/pong #74

Closed
masterkain opened this Issue Sep 20, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@masterkain
Contributor

masterkain commented Sep 20, 2012

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

This comment has been minimized.

Show comment
Hide comment
@stevegraham

stevegraham Sep 20, 2012

Owner

Hey Claudio,

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

Cheers

Owner

stevegraham commented Sep 20, 2012

Hey Claudio,

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

Cheers

@masterkain

This comment has been minimized.

Show comment
Hide comment
@masterkain

masterkain Sep 20, 2012

Contributor

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.

Contributor

masterkain commented Sep 20, 2012

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

This comment has been minimized.

Show comment
Hide comment
@masterkain

masterkain Oct 3, 2012

Contributor

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.

Contributor

masterkain commented Oct 3, 2012

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

This comment has been minimized.

Show comment
Hide comment
@Juanmcuello

Juanmcuello Dec 26, 2013

Contributor

#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.

Contributor

Juanmcuello commented Dec 26, 2013

#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

This comment has been minimized.

Show comment
Hide comment
@stevegraham

stevegraham Jul 18, 2014

Owner

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

Owner

stevegraham commented Jul 18, 2014

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