Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
syncing package metadata in poor internet: heartbeat timeout #2789
Hi, the problem is such, I have a web at a speed of 15Kb / s, the fact is that when I add any package to the project, but I receive the following error.
referenced this issue
Oct 10, 2014
changed the title from
Internet speed 15kb/s
syncing package metadata in poor internet: heartbeat timeout
Oct 14, 2014
Here's my theory about what happens:
T=0 client sends method which will get a 1MB reponse which will take 70 seconds to make it over the network.
T=1 server writes response to the network. Who cares if it gets fragmented or not; it'll still all go in TCP at the same time. It will not be fully read by the client until T=71.
T=30 server sends PING to client. Client can't read it until T=71, whether or not it is app level or websocket level.
T=35 client sends PING to server. (This only happens because it hasn't seen the server's PING yet.)
T=36 server sends PONG to client (which won't be read until after T=71). server also decides that it doesn't care about waiting for a response to the ping it sent at T=30, because the PING it got from the client is good enough, and reschedules its next PING to be sent at T=66.
T=50 client is sad that it still hasn't seen the PONG from the server (at T=36) or any PING (even the one sent at T=30) within 15 of sending its ping at T=35 and closes the connection.
A longer term fix is to make both sides count ANY traffic (at the low level of bytes on the wire, not at the high level of websocket frames) as "other side is alive", not just pings. But for now we're just going to disable client->server heartbeats for the package server connection, and increase the timer for server->client heartbeats in packages.meteor.com specifically.
added a commit
Oct 16, 2014
@alim4egg @piyushcoader We've made some improvements that should hopefully help with this particular issue. Can you run:
and tell me if it succeeds? (It should be very slow because it needs to re-sync the whole catalog from scratch (which doesn't happen in a normal release) but it should at least work without giving you the above error.)