Nodejs memory limit, fatal error js allocation failed — process out of memory

Andrey E
256cats tech blog
Published in
1 min readDec 10, 2015

--

If you get Fatal error js allocation failed — process out of memory when processing large datasets on NodeJS, you should increase memory limit.

Default memory limit is 512MB on 32bit systems and ~1.5GB on 64bit systems. Increase with

node --max-old-space-size=8192 script.js # 8gb memory limit

If you run Node in cluster mode, it’s still limit per process.

Unlisted

--

--

Andrey E
256cats tech blog

I’m frontend developer working for an automotive startup in Berlin, Germany