Error during rebuild: registry.yarnpkg.com ESOCKETTIMEDOUT

I believe the problem isn’t getting the individual packages, but the total time it takes to install them all. If you don’t have enough memory, you can have the problem even if your network speed is fine. The E2.Micro instance I had the problem with has just 1 GB of memory.

For what it’s worth, I just updated Discourse on a 4GB Droplet and didn’t see any particular problems.