Open darkadept opened 7 years ago
Huh, okay, can you export the profiling results and email them to me?
I've seen some background node processes get stuck at 100% cpu on my comp but I haven't figured out why, or if it's related.
Ok. I can finally reproduce it! It's definitely something with the Meteor login code. I'll try to outline the steps to reproduce it again:
Meteor.userId <some random id>
Meteor.loginToken <some random code>
Meteor.loginTokenExpires <some date>
There is another way to trigger the problem:
I have two profiles recorded, on that is good (with normal cpu usage) and one that is bad (with high cpu usage). I'll email them over to you.
Oh, I'll just upload the profiles here.
Hmmm, I wonder if I'm doing something dumb in the way I sync mongo data into redux that's churning unnecessarily. Expanding the worst offenders doesn't yield much specific information...here's what I see. Did you see high CPU usage from the browser too?
No. My if I profile my browser it seems fine. Mostly (idle). In fact, if I close my browser the cpu on the server stays pinned.
Weird. Any idea if you see the same thing with an equivalent pure-meteor app?
I'll check it out and report back.
Ok. I thought I had tried this already but I obviously didn't. I tried using Node 4 instead of 6. And it's fine now.
Node: v4.7.3 Npm: v2.15.11
This is working fine. I guess Meteor is still on node v4 so there is no real way to test a plain Meteor app with node v6. I'm guessing that if I could it would cause the same problem. Maybe, anyways.
You may want to change the line in the README that says tested on Node 6.
Hmm. Well the CI setup does perform integration tests on Node 6, not that they would catch an issue like this. When I find time I'll try to figure out exactly what's going on
I've been having strange issues with crater server-side. I've been getting 100% usage on a single node process. I was pretty sure that it had something to do with the accounts-base meteor package.
I cloned a fresh crater, edited
meteor/.meteor/packages
and addedaccounts-base
, rannpm install
andnpm start
. I watched my cpu usage and it was normal until I loaded the page. Then one of my cpu cores went to 100%. It was the node process. It continues running at 100% even if I close the client web browser.If I run
npm run debug
I can record a JavaScript CPU profile and I can see that a Promise gets called over and over and over. Remember, this is without changing any code, just added the accounts-base package.Now the stupid part is I just tried again and now it's not doing it anymore. At least with my fresh crater clone. It's still doing it consistently in my crater-based app. I did have the problem in a fresh crater clone too though, just not consistent.
In my crater-based app it's running at 100% cpu even in production mode too.
Edit: more details: Node v6.3.1 Npm v3.10.3 O/S: Ubuntu 16.10