# Global variable undefined in subflow?

**URL:** https://discourse.nodered.org/t/global-variable-undefined-in-subflow/43132
**Category:** General
**Created:** [24 March 2021 17:03 UTC](https://discourse.nodered.org/t/global-variable-undefined-in-subflow/43132 "2021-03-24T17:03:43Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 March 2021 13:55 UTC](https://discourse.nodered.org/t/global-variable-undefined-in-subflow/43132/21 "2021-03-25T13:55:32Z")

</div>

Is it possible it is just happening on a restart (before the variable is initialised) and you are getting occasional restarts that you are not aware of?

---

<div class="post-metadata">

### Author: ![r0ller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/r0ller/32/14327_2.png) [@r0ller](https://discourse.nodered.org/u/r0ller)
#### Post date: [26 March 2021 16:09 UTC](https://discourse.nodered.org/t/global-variable-undefined-in-subflow/43132/22 "2021-03-26T16:09:13Z")

</div>

I already wanted to report that I managed to solve it yesterday and the issue was indeed what you guessed 🙂 The app crashes sometimes due to insufficient memory (1GB) on raspberry pi 3B+ but as systemd is configured to restart it, it happens again and again. So we're currently optimising the use of memory mainly doing certain things at file system level instead of doing it in memory.

Thanks again to all for your efforts and time!

---

<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: [25 May 2021 16:10 UTC](https://discourse.nodered.org/t/global-variable-undefined-in-subflow/43132/23 "2021-05-25T16:10:10Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/global-variable-undefined-in-subflow/43132.md?page=1)
