# Memory Leak?

**URL:** <https://forum.inductiveautomation.com/t/memory-leak/3875>\
**Category:** Ignition\
**Created:** [January 17, 2012, 7:08pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875 "2012-01-17T19:08:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [January 17, 2012, 7:08pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/1 "2012-01-17T19:08:21Z")

</div>

Hi

We have run now 2 weeks newest Ignition version and seeing strange memory usage?  
Today my gateway was using already 1010Mb memory and it looks that it was increasing slowly all the time.  
I restart gateway morning and it drop 109Mb but now it has been runnning 10 hours and memory usage is now 357Mb?  
There is no any gateway actions/tasks in this project so I cant understand why this memory usage is increasing?

BR  
Tommi Vahtera

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [January 18, 2012, 6:14am UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/2 "2012-01-18T06:14:20Z")

</div>

Hi

After 21 hour uptime memory usage is 450 Mb? And increasing slowly

Br  
Tommi

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [January 18, 2012, 3:36pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/3 "2012-01-18T15:36:24Z")

</div>

I made small test with fresh Ignition installation on virtual XP.  
Only 1 sqltag where I store gateway memory usage from System/Gateway/Performance/MemoryUsage tag.  
Here is screen dump where is seeing that memory usage is increasing all the time?  
Have anybody else this kind of problem.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/8f346aa5d3d62eabd0e5ece61bd63ed9de39eaab.png)

---

<div class="post-metadata">

**Author:** ![jim\_lapratt](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jim\_lapratt](https://forum.inductiveautomation.com/u/jim_lapratt)\
**Post date:** [January 18, 2012, 5:53pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/4 "2012-01-18T17:53:42Z")

</div>

I just looked at our test server running 7.3.3 its ok. It has the 2 hour limit on it, do not have live server updated to the latest yet.

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [January 18, 2012, 6:30pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/5 "2012-01-18T18:30:27Z")

</div>

Hi

I could reprocess problem also with Demo license and also 32bit and 64bit os?  
Here is small screen where 2 hour time memory usage with 1 tag.  
I have not before explore so well how the memory works in earlier versions but I am sure that it is keeping total usage much lower?  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/41c95ea2406f64d3177bc4fa6178f9bac59484d5.png)

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [January 18, 2012, 6:57pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/6 "2012-01-18T18:57:01Z")

</div>

Hi,

So those results are on a brand new installation with nothing modified?

If so, the question is whether the system eventually runs out of memory, or whether it gets collected. The default amount of max memory is something like 1gb, and we don’t control when Java cleans it up, so it’s very possible that it would let it grow until it became necessary to clean it.

If you want, on your test vm you can edit Ignition.conf to make the max memory much smaller, like 64mb. If this was a real memory leak, the system would eventually crash with “out of memory”. Note, though, that the service wrapper will restart it, so you’ll want to watch the wrapper logs for signs of this.

Regards,

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [January 18, 2012, 7:31pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/7 "2012-01-18T19:31:22Z")

</div>

Hi

I will make some tests and send results.  
It can be true that this is “normal” behavior and not memory leak. I have not collect trend memory usage before but normal when looking CPU and memory usage it has been quite low.

Br  
Tommi

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [January 18, 2012, 9:06pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/8 "2012-01-18T21:06:34Z")

</div>

Hi,

I agree that something is strange, as a brand new installation that isn’t doing anything probably shouldn’t go through much memory, or “churn” it. Are the modules you have installed just those from the default installation? Also, is there any activity in the error console?

Regards,

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [January 19, 2012, 12:25am UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/9 "2012-01-19T00:25:21Z")

</div>

I really like the idea of trending your own memory usage.

hmmm alarm limits? notifications? the possibilities are intriguing… self monitoring systems…

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [January 19, 2012, 12:53pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/10 "2012-01-19T12:53:27Z")

</div>

Ooooo… I like that idea too. I think I’ll add that in to my project. Thanks!

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [January 19, 2012, 1:04pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/11 "2012-01-19T13:04:21Z")

</div>

Hi

I have now tested memory usage a lot and it looks that some reason memory usage is increasing slowly even simple 1 tag project but other hand Java will clean it when reaching max. So I don’t know is there any problems with this?

Tracking memory, CPU and SQL connections is really good to get some history information if somethign goes wrong.

I made it simple gateway script which writes these values back to DB tag which is configured to store history.  
I have small idea to run maybe SQLite for these tags parallel on MySQL. Making sure that these values is stored somewhere else that project data.

Br  
Tommi

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [January 19, 2012, 4:06pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/12 "2012-01-19T16:06:54Z")

</div>

> [@](#):
>
> I made it simple gateway script which writes these values back to DB tag which is configured to store history

In 7.3, there are also the gateway status tags, that include memory usage. You can set these up to log history, alert, etc. The only trick is that scan classes must be defined "per provider", and the status tags are a separate provider. So, you'll want to set up a new historical scan class for it.

In regards to the memory, we'll run some tests and see if we can track down the cause. I think that to some degree this will always happen, since we don't control the garbage collection, but perhaps we can make it less noticeable on a fresh system.

Regards,

---

<div class="post-metadata">

**Author:** ![mcarangelo](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@mcarangelo](https://forum.inductiveautomation.com/u/mcarangelo)\
**Post date:** [May 11, 2012, 7:35pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/13 "2012-05-11T19:35:10Z")

</div>

Could you provide a little more detail about logging system tags? I cant create a new scan class on the tags in the system folder, and I cant edit the tags in system to turn on historical logging…?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [May 11, 2012, 10:02pm UTC](https://forum.inductiveautomation.com/t/memory-leak/3875/14 "2012-05-11T22:02:38Z")

</div>

Hi,

Looks like there’s an issue editing System tag settings in 7.4.2. It has been fixed for the next 7.4.3 beta. After that, it should work like you’d expect, simply double click the tag to add history (and you should now be able to add a scan class, as well).

Regards,
