Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-20 Thread Karim Tarek
Unfortunately no i dont! and i am not sure as i am not that experienced how to spot the piece of code which has the problem :S On Friday, December 19, 2014 11:21:01 AM UTC+2, zladuric wrote: > > Also, do you at least know where in the code is this happening? > > 100% CPU suggests there might be a

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-19 Thread zladuric
Also, do you at least know where in the code is this happening? 100% CPU suggests there might be a blocking bit of code. There are very simple modules, things like [blocked](https://www.npmjs.com/package/blocked), that might help you locate the critical part, if not already, so you might to obs

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-18 Thread Karim Tarek
Thank you very much Ben for your reply i will have a look and perhaps its our only way to know what is going on with our node app thanks! On Thursday, December 18, 2014 3:49:38 PM UTC+2, Ben Noordhuis wrote: > > On Wed, Dec 17, 2014 at 3:09 PM, Karim Tarek > > wrote: > > is there any way to pro

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-18 Thread Ben Noordhuis
On Wed, Dec 17, 2014 at 3:09 PM, Karim Tarek wrote: > is there any way to profile the node app at the spike time only in order to > be able to process it via the node-tick-processor ? We (StrongLoop) recently added a new paid feature to our strong-agent[0] product that profiles selectively during

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Alain
Maybe if you run node with nice (in Linux) you could run some other higher priority command... Enviado através do AquaMail para Android http://www.aqua-mail.com A 17 de dezembro de 2014 12:56:03 Karim Tarek escreveu: The problem is that @ 100% cpu anything installed like node or via npm

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Karim Tarek
The problem is that @ 100% cpu anything installed like node or via npm like new relic doesn't even respond/report during the 100% cpu time. Its like the application froze, nothing working inside of node i tried using the usage module to try to restart node but it didn't work! any other suggesti

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Fedor Indutny
Please consider using some module like: https://www.npmjs.com/package/v8-profiler , to enable and disable profiling in runtime, without logging everything. So just wait for the 100% CPU peak and turn on profiler for a couple of seconds. On Wed, Dec 17, 2014 at 9:09 PM, Karim Tarek < karim.tarek.a

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Karim Tarek
Hi Fedor! Thanks for the reply! i wanted to tell you that i already tried profiling and started node with the --prof parameter but what happened is the following a log file was created for each process and it kept increasing in size like crazy in like 4 hours the file size reached 1.9GB so is t

Re: [nodejs] Nodejs randomly hitting 100% CPU

2014-12-17 Thread Fedor Indutny
Hello Karim, I'd suggest profiling the application during such spikes. It seems that the app is spinning in JS and doing lots of allocations (because of mmap() calls in strace output). Cheers, Fedor. On Wed, Dec 17, 2014 at 5:03 PM, Karim Tarek < karim.tarek.abdelha...@gmail.com> wrote: > > We