<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Data points stop logging]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
We're having an issue with our Mango instance crashing randomly. Data points are received from sources but not committed to the database. The issue can be re-created by running a NoSQL backup. The relevant logs are attached below with the 'Timer already cancelled.' error repeating until the process is rebooted. Rebooting the process gets things going again for another couple of days.</p>
<pre><code>INFO  2017-09-25T09:03:36,695 (com.serotonin.m2m2.rt.maint.work.DatabaseBackupWorkItem.execute:109) - Starting database backup WorkItem. 
INFO  2017-09-25T09:03:36,697 (com.serotonin.m2m2.rt.maint.work.DatabaseBackupWorkItem.createLogOutputStream:224) - Writing upgrade log to /opt/mango/logs/com.serotonin.m2m2.rt.maint.work.DatabaseBackupWorkItem.log 
FATAL 2017-09-25T09:03:51,645 (com.serotonin.timer.TimerThread.run:41) - TimerThread failed 
java.lang.NullPointerException: null
	at com.serotonin.timer.OrderedThreadPoolExecutor$TimePriorityLimitedTaskQueue.add(OrderedThreadPoolExecutor.java:442) ~[mango-3.2.1.jar:?]
	at com.serotonin.timer.OrderedThreadPoolExecutor.execute(OrderedThreadPoolExecutor.java:204) ~[mango-3.2.1.jar:?]
	at com.serotonin.timer.OrderedTimerThread.executeTask(OrderedTimerThread.java:26) ~[mango-3.2.1.jar:?]
	at com.serotonin.timer.TimerThread.mainLoop(TimerThread.java:133) ~[mango-3.2.1.jar:?]
	at com.serotonin.timer.TimerThread.run(TimerThread.java:38) [mango-3.2.1.jar:?]
ERROR 2017-09-25T09:03:53,506 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$RejectableWorkItemRunnable.run:559) - Error in work item 
java.lang.IllegalStateException: Timer already cancelled.
	at com.serotonin.timer.RealTimeTimer.scheduleImpl(RealTimeTimer.java:110) ~[mango-3.2.1.jar:?]
	at com.serotonin.timer.AbstractTimer.schedule(AbstractTimer.java:26) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.maint.BackgroundProcessing.schedule(BackgroundProcessing.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.util.timeout.TimeoutTask.&lt;init&gt;(TimeoutTask.java:41) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.util.timeout.TimeoutTask.&lt;init&gt;(TimeoutTask.java:35) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.TimeoutDetectorRT.scheduleJob(TimeoutDetectorRT.java:103) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.TimeDelayedEventDetectorRT.scheduleJob(TimeDelayedEventDetectorRT.java:27) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.DifferenceDetectorRT.pointData(DifferenceDetectorRT.java:42) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.NoUpdateDetectorRT.pointUpdated(NoUpdateDetectorRT.java:22) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointEventMulticaster.pointUpdated(DataPointEventMulticaster.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointEventMulticaster.pointUpdated(DataPointEventMulticaster.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointEventMulticaster.pointUpdated(DataPointEventMulticaster.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointEventMulticaster.pointUpdated(DataPointEventMulticaster.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointRT$EventNotifyWorkItem.execute(DataPointRT.java:672) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.maint.BackgroundProcessing$RejectableWorkItemRunnable.run(BackgroundProcessing.java:556) [mango-3.2.1.jar:?]
	at com.serotonin.timer.Task.runTask(Task.java:179) [mango-3.2.1.jar:?]
	at com.serotonin.timer.TaskWrapper.run(TaskWrapper.java:23) [mango-3.2.1.jar:?]
	at com.serotonin.timer.OrderedThreadPoolExecutor$OrderedTaskCollection.run(OrderedThreadPoolExecutor.java:307) [mango-3.2.1.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
ERROR 2017-09-25T09:03:55,954 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$RejectableWorkItemRunnable.run:559) - Error in work item 
java.lang.IllegalStateException: Timer already cancelled.
	at com.serotonin.timer.RealTimeTimer.scheduleImpl(RealTimeTimer.java:110) ~[mango-3.2.1.jar:?]
	at com.serotonin.timer.AbstractTimer.schedule(AbstractTimer.java:26) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.maint.BackgroundProcessing.schedule(BackgroundProcessing.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.util.timeout.TimeoutTask.&lt;init&gt;(TimeoutTask.java:41) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.util.timeout.TimeoutTask.&lt;init&gt;(TimeoutTask.java:35) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.TimeoutDetectorRT.scheduleJob(TimeoutDetectorRT.java:103) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.TimeDelayedEventDetectorRT.scheduleJob(TimeDelayedEventDetectorRT.java:27) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.DifferenceDetectorRT.pointData(DifferenceDetectorRT.java:42) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.event.detectors.NoUpdateDetectorRT.pointUpdated(NoUpdateDetectorRT.java:22) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointEventMulticaster.pointUpdated(DataPointEventMulticaster.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointEventMulticaster.pointUpdated(DataPointEventMulticaster.java:94) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.dataImage.DataPointRT$EventNotifyWorkItem.execute(DataPointRT.java:672) ~[mango-3.2.1.jar:?]
	at com.serotonin.m2m2.rt.maint.BackgroundProcessing$RejectableWorkItemRunnable.run(BackgroundProcessing.java:556) [mango-3.2.1.jar:?]
	at com.serotonin.timer.Task.runTask(Task.java:179) [mango-3.2.1.jar:?]
	at com.serotonin.timer.TaskWrapper.run(TaskWrapper.java:23) [mango-3.2.1.jar:?]
	at com.serotonin.timer.OrderedThreadPoolExecutor$OrderedTaskCollection.run(OrderedThreadPoolExecutor.java:307) [mango-3.2.1.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
</code></pre>
<p dir="auto">I've also noticed that the persistent data historical sync also gets held up when trying to fill the holes where data wasn't logged to the main server during these outages (we are using MangoES units on site for redundancy).</p>
<p dir="auto">Any ideas on where to start looking? We need to get this sorted as we are going live to our clients in the next few days.</p>
<p dir="auto">Thanks in advance,<br />
Matt.</p>
]]></description><link>https://forum.mango-os.com/topic/2961/data-points-stop-logging</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 16:08:25 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2961.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Sep 2017 20:24:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Data points stop logging on Tue, 26 Sep 2017 15:18:13 GMT]]></title><description><![CDATA[<p dir="auto">Did you check the other tabs on the the internal page to see if those tasks are identified?</p>
]]></description><link>https://forum.mango-os.com/post/15600</link><guid isPermaLink="true">https://forum.mango-os.com/post/15600</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 26 Sep 2017 15:18:13 GMT</pubDate></item><item><title><![CDATA[Reply to Data points stop logging on Tue, 26 Sep 2017 06:07:49 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,<br />
Thanks for the tips.<br />
I upgraded JAVA about a month ago on all systems so that shouldn't be the issue. Yes, 4 persistent sources (from 4 MangoES publishers) and one publisher (to a MangoES). I'll adjust the thread count and overlap values and see what happens.<br />
Yes, the 6GB option has been enabled in the ext-enabled folder. Mango reports 5.3GB with 5.1GB free. The server has 8 GB total.</p>
<p dir="auto">I did notice this while checking the memory usage.<br />
<img src="https://camo.nodebb.org/64d4d66d40917d24c0b1f56f9779dcd5929514fc?url=https%3A%2F%2Fi.imgur.com%2FP1ju8Vp.png" alt="0_1506405881395_2db5c4b1-2358-4679-8ef9-55be26359f4e-image.png" class=" img-fluid img-markdown" /><br />
I guess this could be due to the large thread count from the persistent publishers.</p>
<p dir="auto">I will do some more probing in the console to see if I get a bit more info. At least I can trigger the fault easily by running a backup.</p>
<p dir="auto">Will keep you posted.</p>
<p dir="auto">Matt.</p>
]]></description><link>https://forum.mango-os.com/post/15594</link><guid isPermaLink="true">https://forum.mango-os.com/post/15594</guid><dc:creator><![CDATA[mattonfarm]]></dc:creator><pubDate>Tue, 26 Sep 2017 06:07:49 GMT</pubDate></item><item><title><![CDATA[Reply to Data points stop logging on Mon, 25 Sep 2017 20:26:29 GMT]]></title><description><![CDATA[<p dir="auto">It should also be mentioned you may wish to update Java. Back around the release of 8_121 we advised everyone update as a memory link was found in an important Java structure around then, although I would doubt if that's the entirety of the issue.</p>
]]></description><link>https://forum.mango-os.com/post/15581</link><guid isPermaLink="true">https://forum.mango-os.com/post/15581</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 25 Sep 2017 20:26:29 GMT</pubDate></item><item><title><![CDATA[Reply to Data points stop logging on Mon, 25 Sep 2017 20:23:39 GMT]]></title><description><![CDATA[<p dir="auto">My mistake, I got the name of the property a little wrong. It's the "Minimum overlap when syncing blocks of data"</p>
<p dir="auto"><img src="https://camo.nodebb.org/7b1823065661d05af4519ec63db810fa8a621aad?url=https%3A%2F%2Fi.imgur.com%2FGdw2FAn.png" alt="0_1506370135425_minimumOverlap.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">|    We currently have 4 persistent data sources on the main server and one persistent data publisher.</p>
<p dir="auto">Other way around? One data source at central and four publishers? If so, I really would recommend turning down the number of sync threads on the publishers.</p>
<p dir="auto">If it were a data point, you should collect thread dumps while Mango is in that state. Collect them via going to the <code>/rest/v1/threads?asFile=true&amp;stackDepth=30</code> endpoint and by using jstack which will be something like <code>$JAVA_HOME/bin/jstack -l $(pidof java) &gt; jstacked</code> then email the thread dumps to us.</p>
<p dir="auto">For a point to be "bad," it could be problematic in the NoSQL database or in the SQL database. If the NoSQL database, it should fix itself. If the SQL database, you would have exceptions when you tried to load that point elsewhere in the UI, like the data points table. If a NoSQL issue has happened, that should be evidenced in the thread dumps. You may also see your point values to be written climbing on the internal metrics page.</p>
<p dir="auto">That is not my expectation, though. I still feel like this is going to be a memory issue. The 6GB is given to Mango in a Mango/bin/ext-enabled/ script? You see the -Xmx and -Xms arguments when you do <code>ps $(pidof java)</code> (presuming this is *nix)? If you are able to easily reproduce it by triggering a NoSQL backup, I advise launching Mango on the command line with <code>Mango/bin/ma.sh start</code> and then triggering a NoSQL backup and watching for the exceptions. An error could be escaping to stderr.</p>
<p dir="auto">I have seen this issue (Timer already cancelled) on an ES doing publishing, and in that instance decreasing the sync threads and increasing the minimum overlap alleviated their problem sufficiently they didn't probe farther.</p>
]]></description><link>https://forum.mango-os.com/post/15580</link><guid isPermaLink="true">https://forum.mango-os.com/post/15580</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 25 Sep 2017 20:23:39 GMT</pubDate></item><item><title><![CDATA[Reply to Data points stop logging on Mon, 25 Sep 2017 20:02:39 GMT]]></title><description><![CDATA[<p dir="auto">Hi Phil,<br />
Thanks for your response.</p>
<p dir="auto">The virtual machine has been upgraded recently and Mango now has access to up to 6GB of RAM (up from 1.5) so memory shouldn't be the issue.<br />
We have plenty of hdd space with 17% used of 70GB.</p>
<p dir="auto">I've turned off backups for now as they cause the system to crash. Errors will begin populating within the first minute of the backup starting.</p>
<p dir="auto">The persistent data sync is running with the default settings so the thread count is set to 10. We currently have 4 persistent data sources on the main server and one persistent data publisher.</p>
<p dir="auto">I'm not sure what you mean by the minimum window size. I cannot find this option in the publisher, source or system settings.</p>
<p dir="auto">We're running core 3.2.1+ enterprise with NoSQL and all modules are up to date.</p>
<p dir="auto">To me it feels like there is a bad data point somewhere in the system and the backup and persistent processes force Mango to probe it, causing an exception. If this is the case, how would I go about finding the problematic point?</p>
<p dir="auto">Cheers,<br />
Matt.</p>
]]></description><link>https://forum.mango-os.com/post/15579</link><guid isPermaLink="true">https://forum.mango-os.com/post/15579</guid><dc:creator><![CDATA[mattonfarm]]></dc:creator><pubDate>Mon, 25 Sep 2017 20:02:39 GMT</pubDate></item><item><title><![CDATA[Reply to Data points stop logging on Mon, 25 Sep 2017 16:58:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi Matt,</p>
<p dir="auto">The Timer Already Cancelled message will happen if an exception or error managed to reach all the way back to the timer thread. Most of the time, i'd say that's an out of memory error. This would probably appear elsewhere in your logs, but it could have been a fair time prior.</p>
<p dir="auto">If a NoSQL backup prompts it, I wonder if 1) you have enough disk space for that NoSQL backup. Check <code>df -h</code> and <code>du -h /opt/mango/backup/*</code> 2) you are doing incremental NoSQL backups or complete NoSQL backups? This would be in the NoSQL section of /system_settings.shtm, 3) Is your NoSQL module up to date?</p>
<p dir="auto">To the persistent data sync, have you increased the minimum window size? This can greatly accelerate syncs and lower the burden of the sync (but it can cause problems if the receiver isn't using NoSQL!). A window size of 500 may be a fair value for your application. Also good to check is your number of sync threads. The default value is 10 which is quite a few. I would consider lowering that to 2 and if all is well increasing it to 4 at most.</p>
<p dir="auto">What version of Mango are you using?</p>
]]></description><link>https://forum.mango-os.com/post/15565</link><guid isPermaLink="true">https://forum.mango-os.com/post/15565</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 25 Sep 2017 16:58:35 GMT</pubDate></item></channel></rss>