Skip to content
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

Downloading node is super slow #562

Closed
SimenB opened this issue Dec 9, 2016 · 51 comments
Closed

Downloading node is super slow #562

SimenB opened this issue Dec 9, 2016 · 51 comments

Comments

@SimenB
Copy link
Member

SimenB commented Dec 9, 2016

X-post: nodejs/nodejs.org#1061

Our builds are currently failing because of this. Sorry if it's the wrong repo

@EloB
Copy link

EloB commented Dec 9, 2016

I've tried to reinstall node and now I can't work because if this :(

@SimenB
Copy link
Member Author

SimenB commented Dec 9, 2016

It usually completes in the end, but not fast enough for CI

@jbergstroem
Copy link
Member

I'll have a look and see if something is up with cloudflare/digitalocean.

@EloB
Copy link

EloB commented Dec 9, 2016

@jbergstroem https://www.cloudflarestatus.com/ they have problem.

@SimenB
Copy link
Member Author

SimenB commented Dec 9, 2016

Either this or nodejs/nodejs.org#1061 should probably be closed, to keep it in one place 😄

@targos
Copy link
Member

targos commented Dec 9, 2016

Not sure it's a cloudflare issue. This is the error I get:

screenshot from 2016-12-09 14-44-53

@SimenB
Copy link
Member Author

SimenB commented Dec 9, 2016

I did get some TLS errors initially, before it just plain timed out

@PeterDaveHello
Copy link
Member

I wonder if there is any chance that we can build/provide mirror service in case we have some familiar problem again?

@jbergstroem
Copy link
Member

Traffic is within 5% of what we can expect around this time of day. I didn't see any out of the ordinary errors in our nginx error log and our ssl certs are valid.

@agsmorodin
Copy link

Issue still exists.
Here is my speed now, Amsterdam location:

wget https://nodejs.org/dist/v0.12.2/node-v0.12.2-linux-x64.tar.gz
--2016-12-09 13:43:57--  https://nodejs.org/dist/v0.12.2/node-v0.12.2-linux-x64.tar.gz
Resolving nodejs.org (nodejs.org)... 104.20.22.46, 104.20.23.46, 2400:cb00:2048:1::6814:162e, ...
Connecting to nodejs.org (nodejs.org)|104.20.22.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9487774 (9.0M) [application/gzip]
Saving to: 'node-v0.12.2-linux-x64.tar.gz.5

 6% [=========>                                                                                                                                                         ] 638,731     14.6KB/s   in 3m 5s  

2016-12-09 13:47:11 (3.36 KB/s) - Connection closed at byte 638731. Retrying.

--2016-12-09 13:47:12--  (try: 2)  https://nodejs.org/dist/v0.12.2/node-v0.12.2-linux-x64.tar.gz
Connecting to nodejs.org (nodejs.org)|104.20.22.46|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 9487774 (9.0M), 8849043 (8.4M) remaining [application/gzip]
Saving to: 'node-v0.12.2-linux-x64.tar.gz.5
1,539,008   5.44KB/s  eta 43m 48s^C

@jbergstroem
Copy link
Member

(I'm not saying we're not experiencing issues, just taking notes from what I can measure)

@malaire
Copy link

malaire commented Dec 9, 2016

Same problem when downloading from Finland -- all larger (few MB or more) downloads fail with Partial Content.

@jbergstroem
Copy link
Member

I'm getting pretty awful packet loss to the origin host; investigating.

@mhdawson
Copy link
Member

mhdawson commented Dec 9, 2016

I can confirm that even just trying to load benchmarking.nodejs.org is taking a really long time from Ottawa/Canada

@jbergstroem
Copy link
Member

jbergstroem commented Dec 9, 2016

Definitely something going on at our host. I've gotten in touch with support but will try to debug as much as possible (which as you know is a great experience over ssh with packet loss).

Update:

  • root disk io: just fine
  • block storage io: all good
  • networking in/out: broken
  • cpu/ram: nothing out of the ordinary (except higher interrupts waiting for network)
  • open tcp connections: low enough to at least rule out starvation attempts

We have rsync jobs almost two hours old (backup, benchmarking, rsync dist) which would point to network degradation at least at that point. Bandwidth history seems to be pretty consistent though..

@bennycode
Copy link

I saw that Travis is downloading Node.js versions via nvm. Even if they are pre-installed on the VM.

Here is what is preinstalled (Build system information):

preinstalled

Here is the log entry from nvm:

image

I don't know why it's doing that (downloading Node.js v6.9.1 again) because we have set an explicit version (which should be pre-installed) in our .travis.yml:

language: node_js
node_js:
  - 6.9.1

Build Log:

@PeterDaveHello
Copy link
Member

@bennyn I think nvm shows the reason as the checksum not matched.

@PeterDaveHello
Copy link
Member

@jbergstroem is there any chance to provide an alternative or mirror site so that we can tolerance the problem until it's fixed? Thanks.

@jbergstroem
Copy link
Member

@PeterDaveHello you can try using http://unencrypted.nodejs.org. It is a mirror but shouldn't be treated as such when nodejs.org is unavailable (read: this is not the official mirror, just an unencrypted version for old http clients)

@jbergstroem
Copy link
Member

Update: The issue is identified, I'm working with DO support to resolve it.

@matthewp
Copy link

matthewp commented Dec 9, 2016

There's a second issue I think should be addressed. If a .travis.yml has a Node version set as 4 or 7 or whatever else and the download fails, Travis shouldn't continue on defaulting to 0.10 as it currently is doing. It should fail immediately, as it can't build what the user intended.

EDIT: whoops, look like that's a new issue for that now. Awesome!

@SimenB
Copy link
Member Author

SimenB commented Dec 9, 2016

@matthewp that's an issue with travis, or maybe nvm. Not nodejs.org

@matthewp
Copy link

matthewp commented Dec 9, 2016

Correct! Sorry for the noise.

@jbergstroem
Copy link
Member

@PeterDaveHello ouch. I'm updating it now -- give it a few minutes.

@PeterDaveHello
Copy link
Member

@jbergstroem is it possible to provide an official method to mirror it?

@jbergstroem
Copy link
Member

@PeterDaveHello unencrypted.nodejs.org is in preparations of being both a http and rsync mirror. We will officially announce it when done.

@PeterDaveHello
Copy link
Member

PeterDaveHello commented Dec 9, 2016

@jbergstroem that's awesome, thanks for the info! Maybe you can consider still enable https on it but just not force https on it, so one more choice, and safer.

@bear
Copy link

bear commented Dec 9, 2016

@jbergstroem CircleCI SRE/Ops person here ... after you have recovered from the event please do reach out to me (us) if we can be of any assistance with mirrors

@jbergstroem
Copy link
Member

Progress update: we will have to move the origin host to finally resolve the network issues. Should not take more than 20 minutes.

@PeterDaveHello
Copy link
Member

@bear it'll be good to have a local mirror inside Circle CI 👍

@jbergstroem
Copy link
Member

@bear: thanks for reaching out.

For those of you that are interested in mirroring; unencrypted.nodejs.org will provide both rsync and http endpoints in a not-too-far future. We will announce this as part of migratating nodejs.org to enforce HSTS (and ssl only).

@jbergstroem
Copy link
Member

20 minutes has passed, so another update: Host is back up; we're still working with support to resolve networking issues - but hopefully this'll come to an end very shortly.

@jbergstroem
Copy link
Member

Update: we're back and catching up. I will keep a close look at performance and will finally close issues once everything is back. Expect a followup blog post / issue once we've collected all information.

@mikeal
Copy link
Contributor

mikeal commented Dec 9, 2016

I wonder if there are some Cloudflare settings we can use to make the caching more aggressive and not run into this in the future.

For our downloads, all of the content is "append only" right? We never replace resources that we put up there so we could make the caching super aggressive.

/cc @terinjokes

@dragon788
Copy link

@jbergstroem You should check out Mosh, https://mosh.org/. At least that way your ssh session will feel responsive instead of utter tripe when on an unreliable connection.

@jbergstroem
Copy link
Member

@mikeal: there's a few things we can do to improve a situation where our origin runs into availability issues:

  1. change the way we generate http logs so we can have cloudflare face all downloads. this requires a few things, most importantly changing our account type at cf
  2. set up a different ruleset for all downloads throuh cloudflare and add redundancy, for instance from unencrypted.nodejs.org once that treated as official.
  3. further explore distributed mirrors and organize them similarly to how other operating system/package managers works.

@mikeal you're correct -- each node.js artifact is treated as read-only once generated (we have checksums for all of them), which means that cf could fully front us once 1. above is accomplished.

@jbergstroem
Copy link
Member

Going to close this issue now, since we've resolved all outstanding issues. Please let us know if you find anything not working. Thanks for having patience with us!

@mikeal
Copy link
Contributor

mikeal commented Dec 9, 2016

changing our account type at cf

Which account type would we need? I thought we had a comp'd enterprise account?

@jbergstroem
Copy link
Member

@mikeal: it used to be enterprise, now is business.

@terinjokes
Copy link

terinjokes commented Dec 9, 2016 via email

@soberstadt
Copy link

Thank you for your hard work! It was a pretty minor inconvenience for me, my Travis builds were not working during the downtime. I assuming that most others were experiencing simular pain. Moving forward, I added this to my .travis.yml file to cache my node version to avoid the build dependency:

cache:
  directories:
    - node_modules
    - ../../../.nvm/versions

@mikeal
Copy link
Contributor

mikeal commented Dec 12, 2016

I spoke with Terin about this. With our current account there are more aggressive caching rules we can set. @terinjokes can give use the exact syntax.

@jbergstroem
Copy link
Member

@terinjokes perhaps drop by our irc channel and have a chat? I'm jbergstroem@freenode, channel is #node-build.

@jbergstroem
Copy link
Member

@mikeal see my comment above as why we don't cache "everything".

@PeterDaveHello
Copy link
Member

PeterDaveHello commented Apr 9, 2017

@jbergstroem Hi! do you still plan to provide official mirror mechanism? Looks like http://unencrypted.nodejs.org/dist/ is down now? Since nodejs.org was down again few days ago and I don't know if there is any ETA on it, I can only use other stupid method to mirror it right now, to prevent the next server down and provide better performance 😉

To those who needs a mirror, you can try: http://ftp.yzu.edu.tw/nodejs.org-dist,
and export to environment variable for node version manager ✨

export NVM_NODEJS_ORG_MIRROR="http://ftp.yzu.edu.tw/nodejs.org-dist"

@jbergstroem
Copy link
Member

@PeterDaveHello it's not gone; its mirrored at http://unencrypted.nodejs.org/download/. The landing page I created to say it was unencrypted was temporarily 404'ing (not sure we should even keep it).

@mohamedalighouma
Copy link

the same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests