# N8n static memory not working

**URL:** <https://community.n8n.io/t/n8n-static-memory-not-working/257617>\
**Category:** Questions\
**Created:** [January 29, 2026, 9:04am UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617 "2026-01-29T09:04:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fellybill](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fellybill/32/50454_2.png) [@fellybill](https://community.n8n.io/u/fellybill)\
**Post date:** [January 29, 2026, 9:04am UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/1 "2026-01-29T09:04:05Z")

</div>

after 10 runs its still apear 1. I have tried this on paid and self hosting .. same issue.

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [January 29, 2026, 11:11am UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/2 "2026-01-29T11:11:15Z")

</div>

@fellybill Your static memory isn’t updating because staticData only persists across manual executions and won’t update when the workflow is run manually or isn’t active, so each run still shows the old value..

---

<div class="post-metadata">

**Author:** ![tamy.santos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tamy.santos/32/153776_2.png) [@tamy.santos](https://community.n8n.io/u/tamy.santos)\
**Post date:** [January 29, 2026, 1:01pm UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/3 "2026-01-29T13:01:19Z")

</div>

hi @fellybill

To make it work, ensure **all three** conditions are met:

1. The workflow is **activated**
2. It is triggered **externally** (Webhook / Trigger node), not via _Execute workflow_
3. `staticData` is updated **before the workflow finishes** , for example:

```auto
const data = this.getWorkflowStaticData('global')
data.counter = (data.counter || 0) + 1
return [{ json: { counter: data.counter } }]

```

If any of these is missing, the value will stay the same.  
This is expected behavior.

---

<div class="post-metadata">

**Author:** ![fellybill](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fellybill/32/50454_2.png) [@fellybill](https://community.n8n.io/u/fellybill)\
**Post date:** [January 29, 2026, 1:20pm UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/4 "2026-01-29T13:20:40Z")

</div>

> [@tamy.santos](#):
>
> ```auto
> 0) + 1
> return [{ json: { counter: data.counter } }]
> 
> ```

the workflow is running automatically. I have been troubleshoot this for 5 days straight .. same issue. memory not persistance .. i did not ran it manuelly . click publish at let it ran for hours, monitoring process in the active executions panel .. Am feedup

---

<div class="post-metadata">

**Author:** ![fellybill](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fellybill/32/50454_2.png) [@fellybill](https://community.n8n.io/u/fellybill)\
**Post date:** [January 29, 2026, 1:21pm UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/5 "2026-01-29T13:21:26Z")

</div>

> [@fellybill](#):
>
> the workflow is running automatically. I have been troubleshoot this for 5 days straight .. same issue. memory not persistance .. i did not ran it manuelly . click publish at let it ran for hours, monitoring process in the active executions panel .. Am feedup

the workflow is running automatically. I have been troubleshoot this for 5 days straight .. same issue. memory not persistance .. i did not ran it manuelly . click publish at let it ran for hours, monitoring process in the active executions panel .. Am feedup

---

<div class="post-metadata">

**Author:** ![tamy.santos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tamy.santos/32/153776_2.png) [@tamy.santos](https://community.n8n.io/u/tamy.santos)\
**Post date:** [January 29, 2026, 1:26pm UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/6 "2026-01-29T13:26:11Z")

</div>

@fellybill

thanks for your patience — I can see why this has been frustrating.

The key point that hasn’t been made explicit yet is this:

**`staticData` is only persisted when a workflow execution fully finishes successfully.**  
If an execution remains active (visible in _Active Executions_), the updated `staticData` is **never committed** , even though the code node runs.

That explains your symptom perfectly:

- The counter increments in memory
- The execution never truly ends
- The value is discarded
- Next run starts again at `1`

This is **expected behavior** , not a bug.

Common reasons an execution never finishes:

- A trigger that keeps the execution open (Webhook, Form, long-polling)
- Long-running or streaming nodes (AI / agents)
- Wait / delay nodes
- Any node that keeps the execution “active” for hours

You mentioned monitoring the workflow in **Active Executions for hours** — that alone confirms why `staticData` never persists.

### What you can do

1. **Ensure the workflow actually finishes**

- No waiting / streaming / open HTTP responses
- Execution must disappear from _Active Executions_

1. **Only use `staticData` for short, finite executions**

- It’s not a general-purpose memory store

1. **For real persistence (recommended)**

- Use a database, Redis, n8n Data Store, or an external service
- `staticData` is intentionally limited by design

So the behavior you’re seeing is expected, and your setup isn’t “broken” — it’s just hitting the documented limits of `staticData`.

Hope this clears it up. If you want to share what trigger or long-running node you’re using, we can confirm exactly what’s keeping the execution open.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 29, 2026, 1:26pm UTC](https://community.n8n.io/t/n8n-static-memory-not-working/257617/7 "2026-04-29T13:26:32Z")

</div>

Closed on April 29, 2026, 1:26pm UTC

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