Node consuming too much resources in 1.3

Is it just me… or is someone else experiencing a lot of CPU being consumed by Node since Meteor 1.3?

1 Like

I’ve seen it for two of my apps running at ~100% CPU on OSX even in idle mode. Same apps work properly on my Ubuntu server. However, the standard todos app is working fine on OSX, so I suspect it’s due to one of the packages I’m using getting messed up by 1.3. Have not had time to debug it yet.

@PolGuixe What platform are you on and what packages are you using?

Has anybody else seen this after upgrading to 1.3?

Yes, I have had a similar issue here. I came to the forums to check to see if anyone else was having the same issue as well.

Github: https://github.com/DDews/bbs

Package list:

Its a small app that has a bulletin board, and a game in the style of Progress Quest/IdleRPG on it.

I was able to run my meteor app just fine before, while doing other things such as developing in Unity3d and playing games, but now the node process is extremely resource hungry, and definitely uses up more resources than it says.

Previously, the node process would use ~300mb of RAM, and have only use cpu when people are playing the game. It would use 0% when nothing was happening.

After updating, node uses up over 1gb of ram, and constantly uses at least one core, even when nobody is doing anything on the server.

I need a fix for this, as this app was being developed as a project for a class I am taking, and I will need to demo it.
I also found meteor extremely easy to develop with. I’d rather not have to use something else, since I picked meteor because of its ease-of-use.

I have also seen the same thing, but I still haven’t the slightest clue of what may be the cause. Sometimes it works again after cleaning .meteor/local and restarting a couple of times.

I am using OSX -I haven’t cheked the app yet on a linux server-.

I am using these meteor packages:

accounts-github            1.0.7* Login service for Github accounts
accounts-meteor-developer  1.0.7* Login service for Meteor developer accounts
accounts-password          1.1.6* Password support for accounts
blaze-html-templates       1.0.2* Compile HTML templates into reactive UI with Meteor Blaze
ecmascript                 0.4.1* Compiler plugin that supports ES2015+ in all .js files
es5-shim                   4.5.8* Shims and polyfills to improve ECMAScript 5 support
huttonr:bootstrap3         3.3.6_10  Modular, customizable Bootstrap 3.
jquery                     1.11.6* Manipulate the DOM using CSS selectors
kadira:flow-router-ssr     3.12.2  Same as kadira:flow-router, but with SSR support
meteor-base                1.0.2* Packages that every Meteor app needs
meteortoys:allthings       2.3.1  Insanely Handy Development Tools
mobile-experience          1.0.2* Packages for a great mobile user experience
mongo                      1.1.5* Adaptor for using MongoDB and Minimongo over DDP
reactive-var               1.0.7* Reactive variable
service-configuration      1.0.7* Manage the configuration for third-party services
standard-minifier-css      1.0.4* Standard css minifier used with Meteor apps by default.
standard-minifier-js       1.0.4* Standard javascript minifiers used with Meteor apps by default.
std:accounts-basic         1.1.8* Basic – Accounts UI for React in Meteor 1.3
std:accounts-ui            1.1.13* Accounts UI for React in Meteor 1.3
tracker                    1.0.11* Dependency tracker to allow reactive callbacks

and these npm packages:

  "eslint": "1.10.x",
    "eslint-plugin-react": "3.15.x",
    "font-awesome": "^4.5.0",
    "mantra-core": "^1.2.0",
    "meteor-node-stubs": "~0.2.0",
    "react": "^0.14.7",
    "react-bootstrap": "^0.28.5",
    "react-dom": "^0.14.7",
    "react-komposer": "^1.3.0",
    "react-mounter": "^1.0.0",
    "react-simple-di": "^1.0.1"

But is really anoying, my laptop gets really hot and battery last nothing… :confounded:

1 Like

For me on OSX node only eats up CPU during (re-)building. After that it settles on 1%, occasionally hitting 4%.

Also note that this topic was already discussed on the forums. The solution that worked for several people was to reinstall Meteor:

1 Like

I only have this problem if I use npm start. Running meteor instead results in normal CPU usage.

3 Likes

My problem was running it using npm start. @maartenbusstra thanks for the tip! (facepalm for not catching it myself!)

Yes, I experienced the problem of 100% CPU usage by the node process after upgrading to Meteor 1.3. This was on one of my servers running CentOS 7.

I solved it by deleting and reinstalling meteor:

rm -rf ~/.meteor
curl https://install.meteor.com/ | sh

Disclaimer: YMMV - make a backup before deleting any files/folders.

Discovered the issue. If I use:
npm run meteor-local which calls meteor --settings .deployments/local-development/settings.json inside the npm package.json.
The node process consumes all the resources of a CPU.

However if I only do:
meteor --settings .deployments/local-development/settings.json
From terminal, then the behaviour is “normal”.

Reasons why?

Any reason why you were using npm run meteor-local instead of calling meteor directly? TBH I never needed to use npm to run my apps, the canonical way to do that is to just use meteor tool.

@M4v3R just because I was lazy to type meteor --settings .deployments/local-development/settings.json :pensive:

Create an alias or a small bash script, then :slight_smile:.

1 Like

But, interestingly, I’ve found that running meteor npm run start doesn’t suck up resources the same way as npm run start. Meteor’s internal (earlier) version of NPM seems more efficient according to my Activity Monitor.

1 Like

Maybe it has something to do with the fact that newer versions of NPM don’t play nice with the older Node version Meteor uses.

I’ve had this in the past too. There’s an open issue on Github.

I ended up using Foreman to run my app and tests at the same time.

1 Like