# Ignition Server Memory Spike

**URL:** <https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [August 22, 2018, 11:10am UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356 "2018-08-22T11:10:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robbie.Wozencroft](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@Robbie.Wozencroft](https://forum.inductiveautomation.com/u/Robbie.Wozencroft)\
**Post date:** [August 22, 2018, 11:10am UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/1 "2018-08-22T11:10:15Z")

</div>

The CPU Trend and Memory Trend on the Ignition Gateway are showing a large and inconsistent spike, resulting in around 10 minutes of downtime after each spike. Logs aren’t showing any immediate causes. Looking for solution.  
Operating System: Windows Server 2008 R2 amd 64  
Java Version 1.8.0\_171-b11  
Ignition Version 7.9.6  
are what is being used

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5c1aa3d88277ddcd75a9e7a3484cff3691d5b3f2.png)

---

<div class="post-metadata">

**Author:** ![Robbie.Wozencroft](https://avatars.discourse-cdn.com/v4/letter/r/b3f665/32.png) [@Robbie.Wozencroft](https://forum.inductiveautomation.com/u/Robbie.Wozencroft)\
**Post date:** [August 22, 2018, 11:11am UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/2 "2018-08-22T11:11:13Z")

</div>

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/ad4aefe8c636e37501dd9b6313deb0c79886d37a.png)

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [August 22, 2018, 11:29am UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/3 "2018-08-22T11:29:59Z")

</div>

I suggest, better provide OS, Java version, Ignition version and wrapper.log file to speed up response from Ignition support.

---

<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:** [August 22, 2018, 1:33pm UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/5 "2018-08-22T13:33:29Z")

</div>

Switch to G1GC. Turn on logging of garbage collector performance. Look for pause-the-world events (aka evacuation pauses) in the logs. See this post for details:

> [@Gateway / Java question 7.7.2](http://forum.inductiveautomation.com/t/gateway-java-question-7-7-2/10402/2):
>
> It is normal for Ignition (and java in general) to cycle between low and high memory usage. In a nutshell, java will defer difficult garbage collection tasks until memory pressure makes it necessary. If there is a great deal of garbage objects when that happens, java will stall briefly while it frees memory. If you have tweaked anything else on your system, you are probably still running what is called the Concurrent-Mark-Sweep garbage collection algorithm (standard for java7). A new garbage…

---

<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:** [April 15, 2019, 4:46pm UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/6 "2019-04-15T16:46:48Z")

</div>

Don’t mean to revive a dead topic but how do you turn on logging of garbage collection in Ignition? I’ve seen you mention it a few times but I can’t find anything in the docs about it.

---

<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:** [April 15, 2019, 5:06pm UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/7 "2019-04-15T17:06:48Z")

</div>

See `wrapper.java.additional.3, 6, 7, & 8` in this post:

> [@Gateway / Java question 7.7.2](http://forum.inductiveautomation.com/t/gateway-java-question-7-7-2/10402/2):
>
> It is normal for Ignition (and java in general) to cycle between low and high memory usage. In a nutshell, java will defer difficult garbage collection tasks until memory pressure makes it necessary. If there is a great deal of garbage objects when that happens, java will stall briefly while it frees memory. If you have tweaked anything else on your system, you are probably still running what is called the Concurrent-Mark-Sweep garbage collection algorithm (standard for java7). A new garbage…

Also see the the section shown below [here](https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/G1GettingStarted/index.html):

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/722d7500815c461b1f758729b051a81d1de4396c.png)

---

<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:** [April 15, 2019, 6:22pm UTC](https://forum.inductiveautomation.com/t/ignition-server-memory-spike/19356/8 "2019-04-15T18:22:30Z")

</div>

Note that those java -XX options have changed in current java versions (9+). This is what I’m using in Ignition 8.0.0:

```auto
wrapper.java.additional.1=-XX:+UseG1GC
wrapper.java.additional.2=-XX:MaxGCPauseMillis=100
wrapper.java.additional.3=-Xlog:gc*:file=/var/log/ignition/javagc-%WRAPPER_TIME_YYYYMMDDHHIISS%.log:t,tm:filecount=5,filesize=16m
wrapper.java.additional.4=-Ddata.dir=/usr/share/ignition/data
wrapper.java.additional.5=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
wrapper.java.additional.6=-Dignition.developer.moduleupload=true

```

{ Adjust folder names to suit your actual install, of course. }
