Node version is v0.11.13
Memory usage during crash according to sudo top
not raises over 3%
Code that reproduces this error:
var request = require('request')
var nodedump = require('nodedump')
request.get("http://pubapi.cryptsy.com/api.php?method=marketdatav2",function(err,res)
{
var data
console.log( "Data received." );
data = JSON.parse(res.body)
console.log( "Data parsed." );
data = nodedump.dump(data)
console.log( "Data dumped." );
console.log( data )
})
To check if that a recursion stack size problem I have ran next code with –stack-size=60000 parameter
var depth = 0;
(function recurse() {
// log at every 500 calls
(++depth % 500) || console.log(depth);
recurse();
})();
and have got
264500
Segmentation fault
Then I ran code which gives me FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed – process out of memory with the same –stack-size=60000 parameter and haven’t got Segmentation fault
.
So I conclude CALL_AND_RETRY_LAST
has nothing common with the recursion stack size.
How could I solve this problem? I believe there is enough free memory on my computer to finish this task successfully.
There are similar questions on stackoverflow but none of this questions are about CALL_AND_RETRY_LAST
that’s why I created separate question.