I deleted mah2.h2.db and did a backup to January 9, (before I added any new sources, points etc) database is now down to ~320MB. No server timeout issues anymore.
Though, at first, I did a backup to January 22 (yesterday), it fell down to ~550MB, but it went into timeout again when I tried to access data sources page. Did a restart, it jumped up to 2.5GB after restart. Note: PC with Mango server is currently without internet connection though it polls its sources via TCP.
Had some obligations to fulfill so I was away from my PC.
I have deleted the Mango/work/jsp directory. Also purged all events and checked system settings for backup and purge policies. Currently, the policy is to purge all point data older than 1 year, all events older than 1 day and discard future dated values more than 24h.
NoSql is doing backups every day and keeps 365 versions.
Since I have NoSql backing up everything daily, is it safe to assume that I can actually purge point data much more frequently?
Just to clarify, I didn't state my H2 database size till now, I stated that my NoSql has 6GB. H2 database took forever to show that info on system settings page, actually I stopped waiting for it to show it, I checked properties on the H2 database inside the file system.
I have a very simple SCADA system with Mango 2.7.10:
-360 data sources in two groups of 180.
-One group has 72 data points per source that update once every 5 minutes.
-The other has 327 data points per source that update once every 24h.
-There is 1 virtual source with 1620 virtual points.
-There is 1 meta source with ~182 meta points
-180 meta points use a simple script that compares certain data point values and returns 0, 1, 2, 3 or 4.
-1 meta point uses a simple script that adds 180 data point values together and divides them by 180 to find the average.
-1 meta point uses a simple script that adds certain data point values together.
-There are 180 hierarchy folders.
-There are ~180 watch lists.
-There are no events and no alarms.
-Server with Mango installed has no other application than Mango
Now, this has all worked well until recently when I added a further 120 data sources with their respective data points, hierarchy folders and watch lists, to make the current total of 360 data sources. After adding this, I've experienced Server Timeouts, but only on data sources page. I am able to check every other page as much as I want, but when I open the data sources page, it starts loading data sources into the list, but stops with the last data point before the timeout being always the same one. It does manage to load them all after some, long, time, but usually it never does and Mango needs to be restarted. If it does manage to load all the sources, it may also go into timeout while waiting to open the edit page for some source. As with the previous case, it can also manage to load it after some long time, but usually it never does and Mango needs to be restarted. I am using the embedded H2 database that has 8.8GB. When Mango goes into timeout, Memory is only 27% used, but all 8 CPU cores go into ~100% usage.
I have all the licences,
Are there too much data points now ~75 000, or too much data sources~180? Is the database too large, if so how large it should be at max? Why is Mango going into timeout like this?
Regards, Stefan Radunovic
Well, my Mango core is 2.7.10.
We were somewhat lucky and unlucky at the same time, it didn't happen again since the last time I turned those sources off and on some 10 days ago, but it will happen again. I'll notify you then, and provide you with answer to your questions.
I've checked the logging page and I see a lot of this
This is my OS (Ubuntu) log, Mango has eaten all the RAM
It seems to me that this is the same issue like in this thread https://forum.infiniteautomation.com/topic/2483/high-cpu-usage/27
I can't send you the log file here, says I don't have permissions to do that. Can you give me your email so I could send it there?