Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

commands stall all the time #5751

Closed
jonathanong opened this Issue · 12 comments

4 participants

@jonathanong

i guess this is more of a meta issue, but my npm commands, specifically update and outdated, stall all the time. i don't think logs are going to help, but here's what the last few lines look like:

npm info trying registry request attempt 1 at 16:17:36
npm http GET https://registry.npmjs.org/lodash._slice
npm verb registry.get https://registry.npmjs.org/lodash.isfunction not expired, no request
npm http 200 https://registry.npmjs.org/lodash._slice
npm http 200 https://registry.npmjs.org/lodash._slice
npm http 200 https://registry.npmjs.org/lodash._basecreatewrapper
npm http 200 https://registry.npmjs.org/lodash._basecreatewrapper
npm http 200 https://registry.npmjs.org/lodash._basebind
npm http 200 https://registry.npmjs.org/lodash._basebind
npm verb registry.get https://registry.npmjs.org/lodash._basecreate not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._setbinddata not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._slice not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._basecreate not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._setbinddata not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._slice not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._basecreate not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._setbinddata not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._slice not expired, no request
npm http 200 https://registry.npmjs.org/lodash._slice
npm http 200 https://registry.npmjs.org/lodash._slice
npm verb registry.get https://registry.npmjs.org/lodash._isnative not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.noop not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._isnative not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.noop not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._isnative not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.noop not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._basecreate not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._setbinddata not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._slice not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash._isnative not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.isobject not expired, no request
npm verb registry.get https://registry.npmjs.org/lodash.noop not expired, no request

running npm cache clean doesn't help at all. my dashboard shows no network activity.

i am using version 1.4.21 and node v0.11.13. keep in mind i've pretty much always had locking issues and have confirmed similar experiences with others, but never bothered to report them. it's only worse now that there are no logs by default and any command for me already takes 30+ seconds already.

@othiym23
Owner
$ npm config set spin false
$ npm config set loglevel http

I'm sure you already know this, but be careful about using Node 0.11.x with npm for publishing, as the shasum implementation up through 0.11.13 is busted.

As for the rest of it, if you get any evidence that the registry is doing something funky from your location, or that the holdups are caused by npm itself, leave another note here. FWIW, I don't have these problems with npm 1.5.0-alpha-4 / node 0.10.29.

Also FWIW, The locking strategies are going to be changing a bunch very soon as part of the cache and multi-stage install work I'm doing.

@tjwebb

I see hangs occasionally too when publishing/packing. I usually need to rm -rf ~/.npm ~/tmp and then re-run. Run with --verbose, npm usually likes to sit at the lock step and fart around for a minute or two.

@othiym23
Owner

One of the goals of the cache rework / npm-cache extraction project is to replace as much of the locking with atomic moves and renames, for exactly this reason. The multi-stage install process will further simplify this process and make it more deterministic. #futurethings

@jonathanong

@othiym23 let us know when you've got a version of npm we can test!

@tjwebb

Do the 1.5.0 alphas have this in there yet?

@othiym23
Owner

@tjwebb / @jonathanong 2.0.0-beta will have the cache rework in it. Keep an eye on #5740. (The multi-stage install stuff will be coming post-2.0.)

@jonathanong

i hope this is fixed soon. i can't even npm install anymore

@jonathanong jonathanong reopened this
@jonathanong

oaky actually i think this is an npm problem. i switched the registry to nodejitsu and everythings fine

scratch that. only installations were fixed.

@othiym23
Owner

I'm reasonably confident at this point the problem is with the caching and installation process's locking code, which will be nerfed very soon by the cache rewrite, which is going to emphasize atomic actions over exclusive locks. The faster the dependencies come off the network, the more likely lock contention is going to cause non-deterministic things to happen with installs. In any case, it sucks, and I'm sorry you're running into this. It will get better soon!

@jonathanong

yeah, i think it's particularly bad for certain projects of mine that have a ton of nested dependencies and a bunch of symlinks all over the place.

@isaacs
Owner

Ironically, this is one area where making things more efficient (and thus faster) can increase the lockfile contention causing ridiculous slowness while two operations wait for one another to time out.

@jonathanong

no longer an issue for me. i'm not sure what's going on because it resolved itself against both nodejitsu and npm at the same time. going to just close this for now.

@jonathanong jonathanong closed this
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.