# Gateway memory leak from OPC connection

**URL:** <https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 31, 2025, 5:34pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216 "2025-07-31T17:34:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torsten\_Giesbrecht1](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@Torsten\_Giesbrecht1](https://forum.inductiveautomation.com/u/Torsten_Giesbrecht1)\
**Post date:** [July 31, 2025, 5:34pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216/1 "2025-07-31T17:34:53Z")

</div>

I've got a very strange problem with my gateway heap memory. For the last few days it's been climbing erratically to max memory and causing a gateway restart. I did some troubleshooting by removing everything(projects, tags, opc connections, device connections etc). Memory stable after that.

Adding them in one at a time I found that the cause seems to be an opc connection that is perpetually in the "connecting" state. Never faults out. I tried reducing the request timeout from 60 to 10s, and the session timeout from 120 to 30s. No difference.

Any insights into why this would cause a memory heap problem and potential solutions would be appreciated. Obviously I can leave the connection disabled, but I'd like to understand why it's happening in the first place so I can avoid this issue in the future.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 31, 2025, 5:38pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216/2 "2025-07-31T17:38:04Z")

</div>

Ooooo! That is almost certainly a bug you should report to IA support (open a ticket). I haven't heard of this particular behavior, and memory leaks are always bad.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 31, 2025, 5:38pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216/3 "2025-07-31T17:38:43Z")

</div>

Is it a connection to a third party server or Ignition's own server?

Never seen this either...

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [July 31, 2025, 5:40pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216/4 "2025-07-31T17:40:21Z")

</div>

It might also be helpful to get a wireshark capture from the gateway to see if the other OPC server is responding strangely or if Ignition is mishandling something.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 31, 2025, 5:45pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216/5 "2025-07-31T17:45:24Z")

</div>

My bet is on some kind of scripting or timer misuse; usages of things like system.util.invokeAsynchronous or system.tag.readAsync/writeAsync being called repeatedly and stacking up because the underlying operation is taking longer against the offline server than whatever the period of these actions are.

@Torsten_Giesbrecht1 if you already have a support ticket open as I suspect, work with them to provide a heap dump taken while the memory is climbing. If not, open a ticket and then do that 🙂

---

<div class="post-metadata">

**Author:** ![Torsten\_Giesbrecht1](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@Torsten\_Giesbrecht1](https://forum.inductiveautomation.com/u/Torsten_Giesbrecht1)\
**Post date:** [July 31, 2025, 5:58pm UTC](https://forum.inductiveautomation.com/t/gateway-memory-leak-from-opc-connection/109216/6 "2025-07-31T17:58:58Z")

</div>

Haven't opened a ticket yet but I'll get on it. It's connecting to a third party server.
