I am having this problem... I am using Windows 7 and Chrome.
I have tried this solution: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
But didn't work.
Also tried this other: Devextreme : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
But I cannot find that file, like if it doesn't exist.
I am trying to do this tutorial.
The code I am executing is this:
var http = require("http"),
fs = require("fs");
http.createServer(function(req, res){
fs.readFile("./index_ASYNC.html", function(err, html){
var i=0;
while(true) {
i++;
res.write(i+""); // Envía respuestas al navegador.
}
// res.writeHead(200,{"Content-Type":"text/html"});
res.end();
});
}).listen(8080);
I execute it using node hola_html.js.
The resulting error:
<--- Last few GCs --->
[5344:00000000002C05B0] 46772 ms: Mark-sweep 1399.5 (1427.9) -> 1399.5 (1427. 9) MB, 2231.9 / 0.0 ms allocation failure GC in old space requested [5344:00000000002C05B0] 49806 ms: Mark-sweep 1399.5 (1427.9) -> 1399.5 (1426. 9) MB, 2583.4 / 0.0 ms last resort GC in old space requested [5344:00000000002C05B0] 52394 ms: Mark-sweep 1399.5 (1426.9) -> 1399.5 (1426. 9) MB, 2588.3 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0000028BF5325EE1 1: _send [_http_outgoing.js:~216] [pc=0000002FDD52590C](this=000000B79B184D2 1 ,data=000003BB18D85CB1 ,encoding=0000010C6FF02201 ,callback=0000010C6FF02201 < null>) 2: /* anonymous */ [C:\Leo\Prodigios\CursoNodeJS\4-encabezados\hola_html_ASY NC_v2.js:~10] [pc=0000002FDD5131F2](this=00000191E280BE21
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memo ry
- I must add, I tried the second option I found on Internet (Devextreme : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory) but it didn't work.