Meteor App hosted 512mb DO Droplet 100% CPU, Stuck troubleshooting


#1

I currently have a testing server up and running and its showing a consistent 98-100% CPU load from the digital ocean graph as well as when I monitor from the pm2 console. I deployed with pm2-meteor, I’ve taken a kadira cpu snapshot but I’m not quite sure how to read it, and I can’t tell what’s taking up all the resources. My hunch tells me it may have something to do with the node version that pm2-meteor runs the app in. I’ve tried to set it to node@4.6.1 via the pm2-deploy.json file but it doesn’t seem to pick up those settings. Below are some useful photos, if anyone could help me troubleshoot this I’d greatly appreciate it. Is this normal for a meteor app? I’ve seen numerous threads where this cpu load occurrence seems to be a common problem, I’m stuck with troubleshooting so figured I’d reach out on here…

One last note, i see that pm2 is listing that the app has restarted 432 times, i’m unsure why this is happening, and when I run this command again the number does not seem to fluctuate. Could this be my issue? I’ve checked the logs and I don’t see any errors related to this…


#2

Pm2 restarts the app when it crashes, you sure the logs show nothing? We are using pm2 too to run many instances of meteor on DO and it’s working great. Btw, I can’t tell, but you have swap, right?


#3

@ramez I’m unfamiliar with swap, so I’d guess no I don’t have it. The logs show nothing at all. I’m going to play with the node version some more, as of right now I can’t get pm2 to run the app using node @4.6.1


#4

So I got node 4.7.0 installed and I can report back my CPU levels are normal now. 0% when no users are on the site. For anyone who encounters this in the future. I uninstalled all versions of node & nvm, and ran this command.

sudo apt-get install -y curl apt-transport-https ca-certificates &&
curl --fail -ssL -o setup-nodejs https://deb.nodesource.com/setup_4.x &&
sudo bash setup-nodejs &&
sudo apt-get install -y nodejs build-essential

Hope it helps.


#5

You need swap, look online how to add it. Next debugging step is to make the command line call to start meteor yourself and watch what happens.