Can you send me the raw *.cpuprofile
file? I know how to read them pretty well
Was it bundled with 4.6.2 or a higher version? It needs to be bundled, and run with the same version ideally. Meteor apps bundled with 6.x or 7.x always run at 100% CPU. This is a major issue MDG should look at, they advice what node to run the apps at, but do not state (to the best of my knowledge) they need to be bundled with it too.
Just install N and run n 4.6.2
to quickly switch
This happens to me too.
On my live bundled app.
I’m using Meteor 1.4.3.2
Node 4.6.2
Ubuntu 16.04 x64
It turns out PM2 (Advance Node Process Manager) was the culprit.
Works fine when I run my app with plain node and foreverjs
$ node main.js
or
$ forever start main.js
Switched to foreverjs for now.
Please let me know how they go over time. I tried using forever instead of PM2 too, it worked for a little but as soon as connections started hitting the server, it jumped straight back up to 100%. Since reverted back to PM2 and found the actual issue root cause, for my deploy at least (mentioned above).
We faced the same issue, CPU shoots up as soon as you make any method calls, then slowly goes down. Even if we comment out most of what is in the method. We reverted to Node 4.6.2 on both development and host and all is working well now. PM2 is also working as planned, so it was not the culprit and I don’t see why it would be.
Haven’t tried with recent node and 1.4.3 meteor, but seen same 100% of cpu with node 6 and node 7 ~ month ago.
Make sure you dont have facts installed, I installed for debugging and forgot about, once I removed CPU when from 100% to 3-5%
I have the similar trouble:
Meteor 1.4.2.5
Node v4.7.3
Deployed with Passenger (more details [here] (http://stackoverflow.com/questions/42100967/passenger-nginx-node-meteor-100-cpu-usage) stackoverflow).
Works fine for some time then cpu usage flies up to 100%.
By the way, the app has a few hundred intervals triggered every 5 sec and making changes to Mongodb (which runs fine on another instance). Could it be a cause?
Well, according to the deployment guide, you have to use specifically Node 4.6.2. So if you’re using any other version you should fix that first.
That’s something new to me ) Should I use Node 4.6.2 on dev. server (where I run meteor build) or production server (where bundle is been deployed) or both?
On the production server.
Meteor is bundled with its own version of Node, so you don’t need to worry about it in development.
Ok, thnx. I’ll try and let you know.
Worked fine almost twice longer than before, but then the same has happened. Rebooting instance doesn’t help, as before.
Noticed that some of my setInterval callbacks does not return anything. May it be a problem?
Downgrading from Node 6.9.1 to 4.6.2 solved the 100% CPU usage issue on Centos 6.8. Thanks for the tips!
Downgrading from Node 6.10.1 to v4.8.1 solved the 100% CPU issue, on Ubuntu 16.04
Hi had this same problem with build meteor 1.4.4.2 + nginx + phusion passenger and node 6. When I change node version for recommended by Meteor ( Node 4.6.2 for Meteor 1.4.x ) its works with cpu until 2 or 3% with no user on app.
Hello, I also have this same problem. I am using the following versions hosted on Digital Ocean:
Meteor: 1.5;
NPM: 4.6.1;
Node: 4.6.2;
I am using this image in docker (https://github.com/mickext/meteord). I am starting the application with the command “meteor node main.js” as you can see in the file (https://github.com/mickext/meteord/blob/master/base/scripts/run_app.sh).
Please someone give me a north, because I have tried everything to stop this CPU overload that is 100% practically as soon as I start the server.
Any help will be welcome.
Thank you.
You need Node 4.8.3 for Meteor 1.5
You can get the correct versions to use with
. meteor node -v
. meteor npm -v
In your development environment
Hello, Rob Fallows thank you very much for your attention. And regarding the way I start the application on the server “meteor node main.js” or “node main.js”
(Https://github.com/mickext/meteord/blob/master/base/scripts/run_app.sh)?
Thank you again.
The second. You should not install the Meteor development tool in production.