Been having 100% CPU usage issues the past few days and I'm not able to
figure out the cause. The setup is postgres for database, express for
framework, and knexjs as the database wrapper.

Every request received does issue a lot of database queries, which honestly
I wouldn't personally think should cause this kind of issues im seeing.

I've profiled the application using Nodetime just to see if I could figure
it out, and from what Nodetime tells me, ~40% is due to Bluebird promises
used by knexjs. Has anyone ever seen this kind of issue before relating to

When I handle anywhere between 1-3 requests at the same time, this isn't an
issue, but if I were to spam requests (or a lot of clients at the same
time) then the server would peak up to 100% CPU usage in no time.

The server isn't great, only running 2gb ram and some half-gitted
processor, but running the same application locally (with much better
processor & ram) causes the same results, just takes a few more requests.

Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/e2aaf5ab-7828-43e4-a433-6a48f5fc2241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupnodejs @
postedNov 18, '14 at 5:16p
activeNov 19, '14 at 1:36p

2 users in discussion

Alex Spencer: 1 post Joran Dirk Greef: 1 post



site design / logo © 2022 Grokbase