# Flowfuse Device Agent crashes. FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

**URL:** <https://discourse.nodered.org/t/flowfuse-device-agent-crashes-fatal-error-reached-heap-limit-allocation-failed-javascript-heap-out-of-memory/96822>\
**Category:** FlowFuse\
**Created:** [30 April 2025 10:11 UTC](https://discourse.nodered.org/t/flowfuse-device-agent-crashes-fatal-error-reached-heap-limit-allocation-failed-javascript-heap-out-of-memory/96822 "2025-04-30T10:11:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![HermanWiid](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@HermanWiid](https://discourse.nodered.org/u/HermanWiid)\
**Post date:** [30 April 2025 15:11 UTC](https://discourse.nodered.org/t/flowfuse-device-agent-crashes-fatal-error-reached-heap-limit-allocation-failed-javascript-heap-out-of-memory/96822/5 "2025-04-30T15:11:19Z")

</div>

> [@Steve-Mcl](#):
>
> No, the device agent installs the node-red version specified in the device settings

Thanks will keep that in mind when I do an update.

> [@Steve-Mcl](#):
>
> Are you able to try something out? If possible, edit the file `lib/launcher.js` in your device agent installation and change the line to something like '--max\_old\_space\_size=1024' (or remove it altogether)

Bingo! 🙂  
Changed --max\_old\_space\_size from 512 to 1024. All flows loaded without any issues.

Thanks a million for all your assistance. Really appreciated.

---

_[View the full topic](https://discourse.nodered.org/t/flowfuse-device-agent-crashes-fatal-error-reached-heap-limit-allocation-failed-javascript-heap-out-of-memory/96822)._
