Debugging nodejs app.js at 100%
-
@hukadan said in Debugging nodejs app.js at 100%:
I cannot help you with Node itself. But if I may, you should run NodeBB using an unprivileged user. You will save yourself a lot of trouble. May be you should also change the user running nginx from
nobody
to something more sensible likewww
orwww-data
.Also, the Node and NodeBB version would certainly help Node gurus.
Thanks for the tips
-
@baris said in Debugging nodejs app.js at 100%:
Post nodejs version disable all custom plugins and see if it still happens. Try updating to nodejs 4.5 and see if it happens.
We are not seeing this issue on this forum or the forums we host. So it's either a nodejs version issue or a custom plugin doing something that's locking the node process. Also check this out https://community.nodebb.org/topic/8998/nodebb-periodically-hangs and https://community.nodebb.org/topic/8789/infinite-loop
This happens at wtdwtf too - we have a script that kills an instance if it pegs a core and stops responding IIRC. I believe it's a nodejs bug.
ETA: The reason we suspect it's a nodejs bug, IIRC (it's been a while since we discussed it), is because it's happening in native code at low levels. I think it was suggested that specific virtualized environments are also related to the issue - DigitalOcean is the one we're using.
-
@sloosecannon said in Debugging nodejs app.js at 100%:
@baris said in Debugging nodejs app.js at 100%:
Post nodejs version disable all custom plugins and see if it still happens. Try updating to nodejs 4.5 and see if it happens.
We are not seeing this issue on this forum or the forums we host. So it's either a nodejs version issue or a custom plugin doing something that's locking the node process. Also check this out https://community.nodebb.org/topic/8998/nodebb-periodically-hangs and https://community.nodebb.org/topic/8789/infinite-loop
This happens at wtdwtf too - we have a script that kills an instance if it pegs a core and stops responding IIRC. I believe it's a nodejs bug.
ETA: The reason we suspect it's a nodejs bug, IIRC (it's been a while since we discussed it), is because it's happening in native code at low levels. I think it was suggested that specific virtualized environments are also related to the issue - DigitalOcean is the one we're using.
Weird
Thanls for the info
We should work all togetjer to try solve this
Can you share that script? -
If the problem doesn't replicate on this community maybe using from now the same version and builf of nodejs used on this community might help in order to not suffer the problem. Anyone knows what version is running here?
Thanks.
-
I haven't seen problems like this either, running on node v4.3.2
-
It may be related to traffic and heavy usage though... this community isn't as heavily used as some other ones.
However that said, we do host some forums with heavy traffic and don't see issues like this, though they are spread out over multiple cores/servers so each individual NodeBB server handles a fraction of the load.
-
@julian said in Debugging nodejs app.js at 100%:
It may be related to traffic and heavy usage though... this community isn't as heavily used as some other ones.
However that said, we do host some forums with heavy traffic and don't see issues like this, though they are spread out over multiple cores/servers so each individual NodeBB server handles a fraction of the load.
Yes. You wont see this issue on low load communities probably, i dont call mine a heavy traffic anyways.
Our server is not phisical and it can handle much more traffic, 12 cores.
The problem must be some function that gets random core at 100% and stuck. That ends on some instances not working and nodebb stop doing nothing at all. -
@exodo said in Debugging nodejs app.js at 100%:
@sloosecannon said in Debugging nodejs app.js at 100%:
@baris said in Debugging nodejs app.js at 100%:
Post nodejs version disable all custom plugins and see if it still happens. Try updating to nodejs 4.5 and see if it happens.
We are not seeing this issue on this forum or the forums we host. So it's either a nodejs version issue or a custom plugin doing something that's locking the node process. Also check this out https://community.nodebb.org/topic/8998/nodebb-periodically-hangs and https://community.nodebb.org/topic/8789/infinite-loop
This happens at wtdwtf too - we have a script that kills an instance if it pegs a core and stops responding IIRC. I believe it's a nodejs bug.
ETA: The reason we suspect it's a nodejs bug, IIRC (it's been a while since we discussed it), is because it's happening in native code at low levels. I think it was suggested that specific virtualized environments are also related to the issue - DigitalOcean is the one we're using.
Weird
Thanls for the info
We should work all togetjer to try solve this
Can you share that script?I don't have access to it, but I'll mention the server admins and see if they can help.
@Ben-Lubar, @boomzilla - can either of you post the restart-script we use at WTDWTF?
-
-
@baris said in Debugging nodejs app.js at 100%:
@jarey We are using nodejs 4.5.0 here.
Just installed 4.5.0
Issue is still there -
Going back to the thread purpose.
Is it possible to run nodebb with node-tick enabled? -
@exodo I would imagine it's something like
node --prof app.js