# Gateway webpage showing different memory usage than OS for Java

**URL:** <https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 2, 2025, 2:10pm UTC](https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823 "2025-05-02T14:10:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [May 2, 2025, 2:10pm UTC](https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823/1 "2025-05-02T14:10:07Z")

</div>

We recently moved from Windows to Linux - ever since the transition, the Kernal's OOM has been shutting down Java about every day due to the system running out of memory.

Something to take note is that Ignition's gateway webpage for memory usage does not match what we are getting with TOP

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/03c4e3f11b3cd4cdfb2408df84758442b349c29f.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/b/0b7a49ec4f5975bf9a12bd65d71e63035caad830.png)

Any ideas?

---

<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:** [May 2, 2025, 3:49pm UTC](https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823/2 "2025-05-02T15:49:05Z")

</div>

> [@tmahaf](#):
>
> does not match

That's because `top` is showing you java's total process memory, and the gateway is showing you the java heap.

Java never releases heap memory back to the OS. It is **vital** in production systems that `ignition.conf` specify the same value for initial and max heap, so Ignition can claim it all up front.

It is also vital that any other processes on that system not use so much memory that the OS runs out. Java **will** be the biggest user in most systems, so it gets picked as the "problem" child.

---

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [May 2, 2025, 4:01pm UTC](https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823/3 "2025-05-02T16:01:41Z")

</div>

Is there any reason why the Java Memory would be higher than the Max Heap setting? (we've been experiencing this).

---

<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:** [May 2, 2025, 4:31pm UTC](https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823/4 "2025-05-02T16:31:33Z")

</div>

Yes. Java's native code is loaded into non-heap memory, and various subsystems (like networking) also have some non-heap memory overhead. Any 3rd party JNI libraries will also add non-heap overhead. Typical is 5-10% extra.

You seem to have substantial non-heap memory usage. You may have a leaky JNI library in your system. What 3rd-party modules or JARs are you using?

---

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [May 8, 2025, 8:07pm UTC](https://forum.inductiveautomation.com/t/gateway-webpage-showing-different-memory-usage-than-os-for-java/105823/5 "2025-05-08T20:07:31Z")

</div>

We upgraded the MQTT Engine module to the latest version and that seems to have resolved the Memory Leak. Thanks @pturmel
