node.jsamazon-ec2

NodeJS takes forever to build on AWS EC2


I am trying to setup NodeJS on EC2.

I followed the official guide and it was successful on my local machine. However when compile the source code on EC2, it takes forever to finish (2 hours and counting). I guess it has something to do with CPU limit or timeout.

I am not familiar with Linux and makefiles. Is there a way to bypass that? Thanks,


Solution

  • I'm guessing you're using a micro instance. Yep, it's going to take a while - micro instances get lots of CPU for a short while, then get severely capped if you use CPU for a while. Compiling node.js is CPU intensive.

    On the bright side, you only have to do it once. Once it's finished, make an AMI and you can launch as many servers with node.js pre-installed as you like.