In my application, there is a situation where the operation takes a very long time, and then several hundred copies of the following message are issued:
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
And then the application crashes:
RangeError: Maximum call stack size exceeded
No stack trace.
How can I diagnose such errors? For example, I would like to know which function call preceded RangeError.
To replicate the error, run node foo.jsin the file foo.jswith the following contents:
var foo = function () {
process.nextTick(foo);
};
foo();
I am not interested in the specific cause of this problem in my application, since I know how to diagnose this type of problem in node.
Node version v0.10.39.
source
share