Memory Leak?

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

Hi

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

Br
Tommi

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.


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.

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?

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,

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

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,

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

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

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

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

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,

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…?

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,