# High memory usage on gateway that only has perspective?

**URL:** <https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 10, 2021, 4:01pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995 "2021-12-10T16:01:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 10, 2021, 4:01pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/1 "2021-12-10T16:01:46Z")

</div>

Started helping a coworker on a pretty fresh perspective project - only 5 views, no clients currently connected, a few SQL tags. I see a high usage warning -

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/4/6434dce303cca478f38d4935fa0aca163b1b28c7.png)

I’m attaching a thread dump I took during the same time as the high usage -  
[Ignition-US8001SV022\_thread\_dump20211210-105332.json](https://forum.inductiveautomation.com/uploads/short-url/PegMNUsLYpPSXbYrPCcWpFZow2.json) (117.4 KB)

Anything else that would be needed to figure out what is causing this I can provide. If someone can point me in the right direction as to what’s causing this I want to refactor before going back to feature creation.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [December 10, 2021, 4:14pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/2 "2021-12-10T16:14:33Z")

</div>

What does the memory trend look like? I’ve seen a gateway give this warning just before doing garbage collection and going back down from 2 GB to 300 MB. Then it gradually ramps back up to 2 GB and the cycle repeats.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 10, 2021, 4:19pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/3 "2021-12-10T16:19:08Z")

</div>

The thread dump doesn’t really tell much of a story; the really useful thing would be a heap dump, but it’s a somewhat more involved process to capture.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 10, 2021, 4:21pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/4 "2021-12-10T16:21:42Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/4/3401a2f65ac5682e6d2e3db0d362e0033b41bf69.png)

@paul-griffith I’ve got nothing but time today if you have a link to a thread on how to do that

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 10, 2021, 4:26pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/5 "2021-12-10T16:26:40Z")

</div>

I’d get [JVisualVM](https://visualvm.github.io/index.html) and start with that.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [December 10, 2021, 4:33pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/6 "2021-12-10T16:33:36Z")

</div>

I think 2GB is a really small amount of memory for a gateway instance in general. Consider bumping to 8GB or higher.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [December 10, 2021, 5:11pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/7 "2021-12-10T17:11:47Z")

</div>

Yeah, that’s not a case of JVM just going up near the limit before garbage cleanup. 2 GB isn’t much memory, but it sounds like your project shouldn’t be using much yet either.

---

<div class="post-metadata">

**Author:** ![jcoffman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jcoffman/32/6429_2.png) [@jcoffman](https://forum.inductiveautomation.com/u/jcoffman)\
**Post date:** [December 10, 2021, 10:02pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/8 "2021-12-10T22:02:44Z")

</div>

I would second the comment that 2gb isn’t enough memory.

This might be related to a memory leak issue with Jetty, the web server library we use within Ignition. could you add the JVM arg `-Dperspective.ws.disablePermessageDeflateExtension=true` to your ignition.conf and restart the gateway and let me know if it the memory usage remains maxed out?

Thanks,  
Jonathan C

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 6, 2023, 4:33pm UTC](https://forum.inductiveautomation.com/t/high-memory-usage-on-gateway-that-only-has-perspective/53995/9 "2023-12-06T16:33:33Z")

</div>

Split this topic on December 6, 2023, 4:33pm UTC

7 posts were split to a new topic: [Memory issues with hosted images](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797)
