New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncing package metadata in poor internet: heartbeat timeout #2789

Closed
alimalibayev opened this Issue Oct 9, 2014 · 6 comments

Comments

Projects
None yet
4 participants
@alimalibayev

alimalibayev commented Oct 9, 2014

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.

dev@dev-945GCT-M2:~$ cd fl
dev@dev-945GCT-M2:~/fl$ meteor add iron:router

/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:206
                        throw(ex);
                              ^
Error: DDP disconnected
    at Object.Future.wait (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:326:15)
    at _.extend.apply (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/service-connection.js:107:31)
    at _.extend.call (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/service-connection.js:84:17)
    at Object.exports.callPackageServer (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/package-client.js:57:20)
    at loadRemotePackageData (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/package-client.js:129:30)
    at getSomeData (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/package-client.js:244:20)
    at _updateServerPackageData (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/package-client.js:296:7)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/package-client.js:201:15
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:247:13
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:240:29
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:238:18
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:229:23
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at Object.capture (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:228:19)
    at Object.exports.updateServerPackageData (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/package-client.js:200:16)
    at _.extend._refresh (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/catalog.js:181:40)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/catalog.js:147:14
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:323:18
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:316:34
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:314:23
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at Object.enterJob (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:300:26)
    at _.extend.refresh (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/catalog.js:143:18)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/commands-packages.js:63:22
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/commands-packages.js:52:11
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:247:13
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:240:29
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:238:18
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:229:23
    at _.extend.withValue (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/fiber-helpers.js:112:14)
    at Object.capture (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/buildmessage.js:228:19)
    at exports.doOrDie (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/commands-packages.js:51:31)
    at refreshOfficialCatalogOrDie (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/commands-packages.js:62:3)
    at main.registerCommand.name [as func] (/home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/commands-packages.js:1895:3)
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/main.js:1241:23
    - - - - -
    at /home/dev/.meteor/packages/meteor-tool/.1.0.33.19qhb7r++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/tools/service-connection.js:69:26
    at packages/ddp/stream_client_nodejs.js:100
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105)
    at _.extend._cleanup (packages/ddp/stream_client_nodejs.js:99)
    at _.extend._lostConnection (packages/ddp/stream_client_common.js:201)
    at _.extend._lostConnection (packages/ddp/livedata_connection.js:955)
    at self._heartbeat.Heartbeat.onTimeout [as _onTimeout] (packages/ddp/livedata_connection.js:1047)
    at _.extend._heartbeatTimeoutFired (packages/ddp/heartbeat.js:79)
    at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
    at packages/meteor/timers.js:6
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108)
@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 10, 2014

Thanks for the report, @alim4egg. We're looking into this and hopefully will have a fix or workaround soon.

@benjamin79

This comment has been minimized.

benjamin79 commented Oct 14, 2014

i have the same problem when the speed gets low (when downloading for example)

@glasser glasser changed the title from Internet speed 15kb/s to syncing package metadata in poor internet: heartbeat timeout Oct 14, 2014

@glasser

This comment has been minimized.

Member

glasser commented Oct 16, 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.

glasser added a commit that referenced this issue Oct 16, 2014

@glasser

This comment has been minimized.

Member

glasser commented Oct 16, 2014

@alim4egg @piyushcoader We've made some improvements that should hopefully help with this particular issue. Can you run:

$ git clone https://github.com/meteor/meteor/
$ cd meteor
$ git checkout 3c1c786
$ ./meteor refresh

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

@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 20, 2014

Hi folks,

Can you please try the new 1.0-rc.2 release? It contains several fixes to improve the experience on slow networks.

Try it out by running your commands with the --release 1.0-rc.2 argument, or by running meteor update --release 1.0-rc.2 in your app.

@glasser

This comment has been minimized.

Member

glasser commented Oct 21, 2014

Since nobody has reported heartbeat-related issues with the new code (and we've heard reports of better experiences), closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment