current community

chat
blog
log out

Stack Overflow

Meta Stack Overflow

Stack Overflow Careers

your communities

edit
cancel

Stack Overflow
100

Ask Ubuntu
1

reset to default list

more stack exchange communities

Stack Exchange

Inbox

Reputation and Badges

100

18

help

Tour

Start here for a quick overview of the site

Help Center

Detailed answers to any questions you might have

Meta

Discuss the workings and policies of this site

Stack Overflow

Questions

Tags

Users

Badges

Unanswered

Ask Question

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

up vote
0
down vote

favorite

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 is similar questions on stackoverflow but none of this questions is about CALL_AND_RETRY_LAST that's why I created separate question.

node.js

share|edit|delete|flag

asked Sep 29 '14 at 7:17

user619271

10018

1

up voted

flag

Your code works fine for me with Node.js 0.10.28. It took 1200 MB of virtual memory and printed an unbelievable amount of junk to the screen, but it seemed to "work."
–
John Zwinck
Sep 29 '14 at 7:26

The junk is exactly what I desired to get. Bad thing is that node 0.10.* does not support harmony generators thus I can't use it for this purposes.
–
user619271
Sep 29 '14 at 8:16

add a comment |

start a bounty

1 Answer
1

active
oldest
votes

up vote
2
down vote

unaccept

If you have a look at the source: github/v8, it seams that you try to reserve one very big object? My experience is this happens if you try to parse a huge JSON object, but when I try to parse your output with JSON and node0.11.13, it just works fine.

You don't need more --stack-size, you need more memory: --max_new_space_size and/or --max_old_space_size.

The only hint I can give you beside that: try another JSON-parser and/or try to change the input format to JSON line instead of JSON only.

share|edit|flag

answered Sep 29 '14 at 7:40

CFrei

65528

Thank you very much! Defining --max_old_space_size=2000000 which I believe means ~2GB had solved my issue. Varying --max_new_space_size don't seemed to have any effect at all.
–
user619271
Sep 29 '14 at 8:20

I also took a look on the v8 source but didn't understood what's going on there at all. So my chances to solve this without your help are probably tend to zero. So thank you again.
–
user619271
Sep 29 '14 at 8:29

add a comment |

Your Answer

draft saved

draft discarded

community wiki

discard

asked

3 months ago

viewed

189 times

active

3 months ago

Hot Meta Posts

43

Add another canned flag decline reason

13

'Unregistered' is offset on the user page

20

Position of favorite tags list

56

Linking to Ideone to show “your code works”

Related

20

Node.js “FATAL ERROR: JS Allocation failed - process out of memory” — possible to get a stack trace?

1

FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory In recursive Node js code

3

nodejs pipe or fs.rename FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of memory

0

FATAL ERROR: JS Allocation Failed - process out of memory

6

NODE.JS: FATAL ERROR- JS Allocation failed - process out of memory, while parsing large excel files

1

CALL_AND_RETRY_0 Allocation failed - process out of memory

0

Node.js / FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

-1

CompressorError: FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory Aborted (core dumped)

0

Fatal error in ../deps/v8/src/handles.h, CHECK(location_ != NULL) failed / FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of memory

1

FATAL ERROR: Evacuation Allocation failed - process out of memory

Hot Network Questions

How to draw stacked cubes of different sizes and colors?

Difficulty in finding a counterexample

Cleaner code for iterables

Getting ligatures of Qv with Linux Libertine

Solve a 2x2 Eigensystem

What's your favorite proof accessible to a general audience?

How to cut 12 in half and get 7

Which one of metochondoria membranes relate to bacteria according to endosymbiotic theory?

Folium of Descartes

Words within words within words within words . . .

Arguments for giving candidates the salary they want - without haggling

What's the diff between blocking a port with a firewall and not starting a service on that port in the first place?

Can a PC use a mirror or other sight enhancer to use sacred flame at a target around a corner?

How to copy files from the folder without the folder itself

Illegal swiss pairings?

Should I share my horrible software?

Is there a quicker way to check if this proposition is self contradictory?

Product and Sum

How do I have centered equations on right case?

Animate point go round a triangle

Missed ordering 10uH inductors for ICs, do I need them?

Which variable gives the value of the current character?

Why does "grep '.*[s]' file" work and "grep .*[s] file" doesn't?

What cues can I use to nudge users away from setting extreme values on a slider?

more hot questions

question feed

lang-js

tour
help
blog
chat
data
legal
privacy policy
work here
advertising info

mobile
contact us
feedback

Technology

Life / Arts

Culture / Recreation

Science

Other

Stack Overflow

Server Fault

Super User

Web Applications

Ask Ubuntu

Webmasters

Game Development

TeX - LaTeX

Programmers

Unix & Linux

Ask Different (Apple)

WordPress Development

Geographic Information Systems

Electrical Engineering

Android Enthusiasts

Information Security

Database Administrators

Drupal Answers

SharePoint

User Experience

Mathematica

Salesforce

more (14)

Photography

Science Fiction & Fantasy

Graphic Design

Seasoned Advice (cooking)

Home Improvement

Personal Finance & Money

Academia

more (10)

English Language & Usage

Skeptics

Mi Yodeya (Judaism)

Travel

Christianity

Arqade (gaming)

Bicycles

Role-playing Games

more (21)

Mathematics

Cross Validated (stats)

Theoretical Computer Science

Physics

MathOverflow

more (7)

Stack Apps

Meta Stack Exchange

Area 51

Stack Overflow Careers

site design / logo © 2015 stack exchange inc; user contributions licensed under cc by-sa 3.0 with attribution required

rev 2015.1.25.2220