# Memory management - js heap size

**URL:** <https://discourse.nodered.org/t/memory-management-js-heap-size/60729>\
**Category:** General\
**Tags:** docker\
**Created:** [3 April 2022 16:12 UTC](https://discourse.nodered.org/t/memory-management-js-heap-size/60729 "2022-04-03T16:12:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pet](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@pet](https://discourse.nodered.org/u/pet)\
**Post date:** [3 April 2022 16:12 UTC](https://discourse.nodered.org/t/memory-management-js-heap-size/60729/1 "2022-04-03T16:12:11Z")

</div>

I'm running node-red on a docker container, on Linux.  
Node.js v 14.18.2  
Node-red v 2.2.2

I have several flows. When the all active, or even few of them, i have an error thrown y nodejs.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memery.

The error occurs when i run node-red UI and when i invoke http endpoints in my flows.  
When i use each flow separately i have no errors.

I need to increase js heap size in the docker container.  
I use docker compose.

What is the best way to do it?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 June 2022 16:12 UTC](https://discourse.nodered.org/t/memory-management-js-heap-size/60729/2 "2022-06-02T16:12:45Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
