<?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[Alarms due to high priority task already running]]></title><description><![CDATA[<p dir="auto">A mango instance has generated 50 "urgent" alarms in the last 8 days with the message</p>
<pre><code>High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@84cbc5 was rejected because it is already running.
</code></pre>
<p dir="auto">I have changed the rejected work item system event alarm level to none so we won't get this alarm that we can't do anything about.</p>
<p dir="auto">How can I tell what the task was and whether or not it is an important issue I need to address?</p>
]]></description><link>https://forum.mango-os.com/topic/2178/alarms-due-to-high-priority-task-already-running</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 21:49:00 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2178.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Mar 2016 16:12:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Alarms due to high priority task already running on Mon, 09 May 2016 18:02:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a> Thanks for the update. Please keep in mind that this problem is not unique to my installation.</p>
]]></description><link>https://forum.mango-os.com/post/11569</link><guid isPermaLink="true">https://forum.mango-os.com/post/11569</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Mon, 09 May 2016 18:02:45 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Mon, 09 May 2016 17:58:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pedro" aria-label="Profile: Pedro">@<bdi>Pedro</bdi></a> thanks for the information,</p>
<p dir="auto">I was unable to come up with a solution for your system with the time I had allotted.  In the next few weeks (for the 2.8.0 release) we will be making changes to the code in these areas.  Once we re-open development I will be able to take a closer look and set up some simulations to see where we can make improvements.</p>
<p dir="auto">I will be in touch with any questions or requests for more information as soon as we begin 2.8.0 development.</p>
<p dir="auto">Thanks,<br />
Terry</p>
]]></description><link>https://forum.mango-os.com/post/11568</link><guid isPermaLink="true">https://forum.mango-os.com/post/11568</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Mon, 09 May 2016 17:58:09 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Mon, 09 May 2016 13:45:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a> Since the restart the CPU idle time has been around 70% and graphical view simplepoints have been updating much faster. However, high priority tasks are still being "rejected because Task Currently Running:"</p>
<pre><code>2016-05-08 23:28:36,733 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@39de09ff rejected because Task Currently Running 
2016-05-08 23:47:59,172 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@775e67cb rejected because Task Currently Running 
2016-05-08 23:47:59,327 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@39de09ff rejected because Task Currently Running 
2016-05-09 00:07:11,462 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@1c7b07ad rejected because Task Currently Running 
2016-05-09 00:26:35,707 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@30133195 rejected because Task Currently Running 
2016-05-09 00:26:35,719 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@588b748a rejected because Task Currently Running 
2016-05-09 00:45:48,775 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@1260f118 rejected because Task Currently Running 
2016-05-09 01:05:18,388 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@2795a94 rejected because Task Currently Running 
2016-05-09 01:24:34,660 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@3dc97162 rejected because Task Currently Running 
2016-05-09 01:43:50,236 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@4b00d126 rejected because Task Currently Running 
2016-05-09 02:03:05,363 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@fec7ec6 rejected because Task Currently Running 
2016-05-09 02:22:22,817 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@39de09ff rejected because Task Currently Running 
2016-05-09 02:41:36,815 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@3dc97162 rejected because Task Currently Running 
2016-05-09 03:00:53,652 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@39de09ff rejected because Task Currently Running 
2016-05-09 03:20:15,385 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@1260f118 rejected because Task Currently Running 
2016-05-09 03:39:32,514 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@588b748a rejected because Task Currently Running 
2016-05-09 03:58:53,301 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@4b00d126 rejected because Task Currently Running 
2016-05-09 04:18:13,426 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@3dc97162 rejected because Task Currently Running 
2016-05-09 04:37:13,392 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@30133195 rejected because Task Currently Running 
2016-05-09 04:56:29,434 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@2795a94 rejected because Task Currently Running 
2016-05-09 05:16:03,176 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@2795a94 rejected because Task Currently Running 
2016-05-09 05:56:16,256 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@4b00d126 rejected because Task Currently Running 
2016-05-09 06:16:13,354 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@b082053 rejected because Task Currently Running 
2016-05-09 06:35:48,535 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@2795a94 rejected because Task Currently Running 
2016-05-09 06:55:42,575 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@4b00d126 rejected because Task Currently Running 
2016-05-09 07:15:19,662 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@fec7ec6 rejected because Task Currently Running 
2016-05-09 07:15:19,947 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@79cb4799 rejected because Task Currently Running 
2016-05-09 07:35:53,464 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@30133195 rejected because Task Currently Running 
2016-05-09 07:55:40,366 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@2795a94 rejected because Task Currently Running 
2016-05-09 08:16:35,096 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@fec7ec6 rejected because Task Currently Running 
2016-05-09 08:37:16,287 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@30133195 rejected because Task Currently Running 
2016-05-09 09:17:54,381 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@33bf3c4c rejected because Task Currently Running 

</code></pre>
]]></description><link>https://forum.mango-os.com/post/11559</link><guid isPermaLink="true">https://forum.mango-os.com/post/11559</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Mon, 09 May 2016 13:45:02 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Fri, 06 May 2016 14:22:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a> There may be a way to reproduce this issue, if it is caused by a high CPU load: since recent Mango versions take more CPU to render graphical views, if enough users or web browsers display a complex graphical view, the CPU idle time will fall too low, task timeouts will occur, and errors will start filling the event list and ma.log. Additional CPU will be utilized to send event emails.</p>
<p dir="auto">The additional load will likely put Mango into a sustained mode where the tasks cannot meet with real-time, and the task manager will start shedding tasks and generating more error messages. At that point, reducing the page views will not lower the CPU load sufficiently to dig itself out of this vicious cycle, and servicing those very errors will sustain the high CPU load.</p>
<p dir="auto">Obviously I do not want to cause this error on my live system, but I offer the following methods of preventing, assessing, and mitigating these issues:</p>
<p dir="auto"><strong>Assessment</strong>:</p>
<ul>
<li>Add a profiler to display to the admins how much time each module is using. A core module time per page rendered would also be useful.</li>
<li>Add a "Runtime status" section to report poll times of metadata sources, or of metadata points. If it can be resource intensive, pass it as a command switch for troubleshooting.</li>
</ul>
<p dir="auto"><strong>Prevention</strong> (or reduction):</p>
<ul>
<li>Use the above time profiling data to determine what is causing most of the CPU load, so either developers or users can determine what part of their configuration consumes the most CPU, so they know where to make optimizations.</li>
<li>Optimize the graphical view renderer for better performance</li>
<li>Does Mango log in/out of the POP server after each email it sends? If so, increase email notification performance by not logging out.</li>
</ul>
<p dir="auto"><strong>Mitigation</strong>: once mango is in this vicious cycle of reporting errors, CPU load must be reduced to break the cycle by reducing the CPU error-servicing load:</p>
<ul>
<li>Allow the administrator to <em>temporarily</em> raise the bar on servicing events, such as:
<ul>
<li>Suspend reporting timeout errors to the event database</li>
<li>Suspend reporting timeout errors to ma.log</li>
<li>Raise ma.log reporting level to not report WARN</li>
<li>Raise the bar on outgoing event emails (Information, Urgent, Critical)</li>
<li>Raise the bar on logging to the event database (Information, Urgent, Critical)</li>
</ul>
</li>
<li>Temporarily flush either the low, medium, or high priority job queue</li>
<li>Once the system is caught up, these measures should be put back to normal.</li>
</ul>
<p dir="auto">Perhaps this could be thought of as a soft reset rather than a hard restart.</p>
]]></description><link>https://forum.mango-os.com/post/11538</link><guid isPermaLink="true">https://forum.mango-os.com/post/11538</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Fri, 06 May 2016 14:22:00 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Fri, 06 May 2016 12:31:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a> My email hosting provider finally unblocked my outgoing emails, which had been blocked because it was also hosting Mango's alarm emails. So I just emailed the requested data to the support email address.</p>
<p dir="auto">Since Mango was even slower today, I finally restarted it, taking the opportunity to upgrade the API, dashboard, and report modules.</p>
<p dir="auto">The % idle  went up significantly today:<br />
<img src="https://camo.nodebb.org/0414dd6c47e869542ba3574890e3aaff4ba7698c?url=https%3A%2F%2Fi.imgur.com%2FT0RYvC0.png" alt="0_1462484114960_CPU-idle-1week.png" class=" img-fluid img-markdown" /><br />
And the CPU usage (100-idle%) went down accordingly:<img src="https://camo.nodebb.org/3e10583dcf220061dcb81d64a25112dc7e15d4a5?url=https%3A%2F%2Fi.imgur.com%2FVnUrXd9.png" alt="0_1462484034278_CPU-utilization-1day.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">My working theories are that either:</p>
<ul>
<li>There is a memory leak that led to excessive disk swapping</li>
<li>Some error messages that used to only show up in ma.log also show up in /events.shtm. The combination of writing errors to SQL and text to ma.log may have caused Mango to fall behind on its tasks, to the point where it could not keep up unless it cancelled high priority taks</li>
<li>An intermittent task either continually raised the CPU utilization, and was killed during the restart.</li>
</ul>
<p dir="auto">Of the graphs below, the most interesting ones to me are the block writes, interrupts per second, swap memory, and heap memory. Labels are above the graphs. I think the block writes growing may be the ma.log writing rate increasing due to a positive feedback loop. What explains JVM-max-available-memory?</p>
<p dir="auto">CPU-IOwait<br />
<img src="https://camo.nodebb.org/e6a5aa80affdcf84cc4392eafa925bd43eac7674?url=https%3A%2F%2Fi.imgur.com%2FKHQf9at.png" alt="0_1462485630884_CPU-IOwait.png" class=" img-fluid img-markdown" /><br />
free-memory<br />
<img src="https://camo.nodebb.org/5b71d95ba5341be8df39470f2cd62fa4da72cc67?url=https%3A%2F%2Fi.imgur.com%2F43MFtVQ.png" alt="0_1462485653691_free-memory.png" class=" img-fluid img-markdown" /><br />
interrupts-per-second<br />
<img src="https://camo.nodebb.org/e0698915c28ab9930effff260a425126f708d9fe?url=https%3A%2F%2Fi.imgur.com%2FUpKWP2A.png" alt="0_1462485670963_interrupts-per-second.png" class=" img-fluid img-markdown" /><br />
jvm-heap-memory<br />
<img src="https://camo.nodebb.org/1f62953d1be2b1417ce347b2446d721faa264af0?url=https%3A%2F%2Fi.imgur.com%2Fv3ku1jj.png" alt="0_1462485731385_jvm-heap-memory.png" class=" img-fluid img-markdown" /><br />
JVM-max-available-memory<br />
<img src="https://camo.nodebb.org/317406280c3180d8bf3e1410ed2ce17e8d2458a4?url=https%3A%2F%2Fi.imgur.com%2Fu25LKe3.png" alt="0_1462485841215_JVM-max-available-memory.png" class=" img-fluid img-markdown" /><br />
swap-memory<br />
<img src="https://camo.nodebb.org/de8f32d4655ad6f25ee66048d1c09c52bde9aa17?url=https%3A%2F%2Fi.imgur.com%2Fs4NLZSc.png" alt="0_1462485888291_swap-memory.png" class=" img-fluid img-markdown" /><br />
scheduled-work-items<br />
<img src="https://camo.nodebb.org/a40d3fff9927da37bd607d565bdf824fbaa04637?url=https%3A%2F%2Fi.imgur.com%2F5L6M8Wp.png" alt="0_1462485863818_scheduled-work-items.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.mango-os.com/post/11532</link><guid isPermaLink="true">https://forum.mango-os.com/post/11532</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Fri, 06 May 2016 12:31:41 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 04 May 2016 22:04:49 GMT]]></title><description><![CDATA[<p dir="auto">I'm storing pointValues in TSDB. However, if I want to retain the point history I presume I would have to reassign the point using SQL, since I cannot move points from one datasource to another. It would be very nice if I could do that, as there are a number of metadata points that I would like to move from one metadata source to another without having to get dirty with SQL, which I find risky.</p>
<p dir="auto">I'm running Java 8 under Ubuntu:</p>
<pre><code>$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

</code></pre>
]]></description><link>https://forum.mango-os.com/post/11525</link><guid isPermaLink="true">https://forum.mango-os.com/post/11525</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Wed, 04 May 2016 22:04:49 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 04 May 2016 21:02:47 GMT]]></title><description><![CDATA[<p dir="auto">Pedro,</p>
<p dir="auto">A few questions about performance.</p>
<ol>
<li>
<p dir="auto">From what you said about SQL console it appears you are storing all your point value data in MySQL, is that correct?</p>
</li>
<li>
<p dir="auto">Are you running on Java 7 or 8?  I benchmarked the latest Java 8's Nashorn javascript engine against the old Mozilla engine and found it to be almost 2x as fast when running Mango's data source scripts.</p>
</li>
</ol>
]]></description><link>https://forum.mango-os.com/post/11523</link><guid isPermaLink="true">https://forum.mango-os.com/post/11523</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Wed, 04 May 2016 21:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 04 May 2016 20:45:03 GMT]]></title><description><![CDATA[<p dir="auto">Thanks. The points are used by meta datasource functions, and displayed in a graphical view where certain users can easily change their values by directly entering a new point value. Perhaps it would be more accurate to call them "user-edited "threshold values," i.e. "variables that seldom change" rather than calling them constants. Some are changed by a metadata function, but that is the exception.</p>
<p dir="auto">I probably have well over one hundred javascript metadata functions. I don't want the settings in a global script because they would not be user-editable, nor would their history be logged. From what you state, it sounds like I should move those seldom-changing variables from meta to a NO_CHANGE virtual source. However, if I do that, I will lose my point history unless I roll up my sleeves and issue some commands from Mango's mySQL console, which I'd rather avoid unless I can expect a noticeable impact on performance.</p>
]]></description><link>https://forum.mango-os.com/post/11522</link><guid isPermaLink="true">https://forum.mango-os.com/post/11522</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Wed, 04 May 2016 20:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 04 May 2016 20:29:35 GMT]]></title><description><![CDATA[<p dir="auto">Pedro,</p>
<p dir="auto">It all depends on what you are using the constants for.  If they are only used in a Meta or Scripting data source then a Global Script constant would be best.  If you need them inside a data point or the data base then a low period polling Virtual data source would be best.  I would think running a script to store them in a data point would be the least ideal option as the Javascript engine needs to be run up and execute the script where a No Change virtual point literally does nothing when it polls besides spawning the poll thread.</p>
]]></description><link>https://forum.mango-os.com/post/11521</link><guid isPermaLink="true">https://forum.mango-os.com/post/11521</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Wed, 04 May 2016 20:29:35 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 04 May 2016 19:55:24 GMT]]></title><description><![CDATA[<p dir="auto">Terry,</p>
<p dir="auto">Like you, I was also surprised that a virtual data source would abort polls considering it does not have much work to do. I dumped the threads to a 1MB JSON file. This was easy as this FATAL error occurs frequently. I will email it to support@...., along with the JSON for the points of the Settings data source and a snippet of ma.log. Unfortunately the high number of alarms this error generated has triggered a spam threshold, which caused my email provider to disable outgoing emails from my domain. So I must wait for the spam limiter to reset before I can send the email.</p>
<p dir="auto">The Settings datasource is used only to hold constants. Is it best practice to hold constants in a NO_CHANGE virtual datasource, or in a metadata point as: <code>return my.value;</code>  set to update once per year?</p>
]]></description><link>https://forum.mango-os.com/post/11520</link><guid isPermaLink="true">https://forum.mango-os.com/post/11520</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Wed, 04 May 2016 19:55:24 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 04 May 2016 19:15:02 GMT]]></title><description><![CDATA[<p dir="auto">Pedro,</p>
<p dir="auto">Its very odd for a virtual data source to abort polls as there are only a few ways it won't have enough time to complete its poll in time.  Can you supply us with the following information:</p>
<ol>
<li>The JSON config for the points of your 'Setting' data source.</li>
<li>A thread dump from a time when you are experiencing the symptoms.  This can be done by hitting this url in a web browser:</li>
</ol>
<pre><code>http://{mango-host}:{mango-port}/rest/v1/threads?depth=30&amp;asFile=true
</code></pre>
<ol start="3">
<li>If getting the dump proves difficult you can try to setup an Email event handler for that data source on the PollAborted Event and include the system information.  Although this approach might be dangerous if you are aborting a lot of polls frequently.</li>
</ol>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.mango-os.com/post/11519</link><guid isPermaLink="true">https://forum.mango-os.com/post/11519</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Wed, 04 May 2016 19:15:02 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 13 Apr 2016 17:10:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a>  I am becoming increasingly alarmed with the high number of alarms, alarm emails, and possible internal side effects of the timeouts described here, especially since they pertain to an internal virtual datasource. I don't know whether the higher than usual CPU utilization is a cause or effect, or unrelated. Mango is running on a powerful rack server, so I don't expect this to be due to an underpowered CPU.</p>
<p dir="auto">According to /events.shtm, in approximately the last twelve hours I have received 136 events like this one:</p>
<pre><code>High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@10868dc7 was rejected because it is already running.
</code></pre>
<p dir="auto">which are associated with the ma.log entry:</p>
<pre><code>2016-04-13 12:46:46,384 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@502c592b rejected because Task Currently Running  

</code></pre>
<p dir="auto">and received 126 events like this:</p>
<pre><code>'Setting': Data source with xid: DS_Setting and name: Setting, aborted 7413 polls.
</code></pre>
<p dir="auto">which are associated with the ma.log entry:</p>
<pre><code>2016-04-13 12:46:46,392 WARN  (com.serotonin.m2m2.rt.dataSource.PollingDataSource.scheduleTimeout:117) - Setting: poll scheduled at 2016/04/13 12:46:45.171 aborted because its start time of 2016/04/13 12:46:46.392 is more than the time allocated for in its poll period.  

</code></pre>
<p dir="auto">Sometimes I receive several such errors per minute.</p>
<p dir="auto">The "Setting" datasource is simply a virtual source used to hold constant values:</p>
<pre><code>{
   "dataSources":[
      {
         "xid":"DS_Setting",
         "name":"Setting",
         "enabled":true,
         "type":"VIRTUAL",
         "alarmLevels":{
            "POLL_ABORTED":"URGENT"
         },
         "purgeType":"YEARS",
         "updatePeriodType":"SECONDS",
         "updatePeriods":1,
         "editPermission":null,
         "purgeOverride":true,
         "purgePeriod":10
      }
   ]
}
</code></pre>
<p dir="auto">One point is "type":"RANDOM_MULTISTATE" but it is disabled.<br />
All other points are "type":"NO_CHANGE"</p>
<p dir="auto">I don't understant why this is causing such problems. Let me know if I should email you the complete json point list. What can be done about this?</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.mango-os.com/post/11421</link><guid isPermaLink="true">https://forum.mango-os.com/post/11421</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Wed, 13 Apr 2016 17:10:21 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 30 Mar 2016 20:40:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi Pedro,</p>
<p dir="auto">I hesitate to speculate about why those threads are getting rejected. I would be it's the garbage collector spawning and locking everything down for an instant. I'm certainly looking forward to them all having descriptions.</p>
<p dir="auto">Those threads as you posted are not a concern. That's an unoccupied thread, sitting in the pool waiting for allocation. You don't have messages about the thread pool being full, just that a certain rescheduling task is aborting because its previous incarnation is still running.</p>
<p dir="auto">I will keep an eye out for the CPU consumption behavior you describe.</p>
]]></description><link>https://forum.mango-os.com/post/11362</link><guid isPermaLink="true">https://forum.mango-os.com/post/11362</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 30 Mar 2016 20:40:15 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Tue, 29 Mar 2016 01:17:00 GMT]]></title><description><![CDATA[<p dir="auto">I just received this</p>
<pre><code>2016-03-28 20:01:09,035 FATAL (com.serotonin.m2m2.util.timeout.RejectedHighPriorityTaskEventGenerator.rejected:27) - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@38c10714 rejected because Task Currently Running  
</code></pre>
<p dir="auto">I don't know if it's related, but around that time my CPU idle time plummeted, according to Mango's vmstat datasource:</p>
<p dir="auto"><img src="/forum/uploads/files/1459213720642-cpu-idle-time.png" alt="0_1459213718105_CPU-idle-time.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">And even though the idle time eventually came back up somewhat, there are still some suspicious threads like this one:</p>
<pre><code>TIMED_WAITING	Unsafe.java:-2
LockSupport.java:215
AbstractQueuedSynchronizer.java:2078
ArrayBlockingQueue.java:418
QueuedThreadPool.java:531
QueuedThreadPool.java:47
QueuedThreadPool.java:590
Thread.java:745
</code></pre>
<p dir="auto">... which I pasted from the thread monitor page:<br />
<img src="/forum/uploads/files/1459213462429-unsafe-java-2-locksupport-threads.png" alt="0_1459213456502_Unsafe-java-2-LockSupport-Threads.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I have noticed since last year that the idle time decreases more or less week after week, and that there is much more idle time the first few days after a Mango restart. Do you have any suggestions?</p>
]]></description><link>https://forum.mango-os.com/post/11353</link><guid isPermaLink="true">https://forum.mango-os.com/post/11353</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Tue, 29 Mar 2016 01:17:00 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Fri, 25 Mar 2016 15:49:10 GMT]]></title><description><![CDATA[<p dir="auto">I'm receiving a lot of these alarms too. They do not occur during regular time intervals:</p>
<pre><code>Event active notification ** Urgent **
08:25:30 - High priority task: com.serotonin.m2m2.util.timeout.TimeoutTask@502c592b was rejected because it is already running.
</code></pre>
<p dir="auto">They usually coincide with this alarm:</p>
<pre><code>Event active notification ** Urgent ** 
08:25:29 - 'Setting': Data source with xid: DS_Setting and name: Setting, aborted 163 polls.
</code></pre>
<p dir="auto">DS_Setting is a "Virtual data source" with a 1-second Update period. There are 27 "type":"NO_CHANGE" datapoints in that source. The only other change type is "RANDOM_MULTISTATE," but that point is disabled.</p>
<p dir="auto">What follows at 8:25am is multiple timeouts of Modbus or BACnet polls, reported in ma.log:</p>
<pre><code>2016-03-25 08:25:30,476 WARN  (com.serotonin.m2m2.rt.dataSource.PollingDataSource.scheduleTimeout:117) - SCM: poll scheduled at 2016/03/25 08:25:29.171 aborted because its start time of 2016/03/25 08:25:30.476 is more than the time allocated for in its poll period. 
2016-03-25 08:25:30,475 WARN  (com.serotonin.m2m2.rt.dataSource.PollingDataSource$2.execute:226) - Mod1: poll scheduled at 2016/03/25 08:25:30.000 aborted because Task Currently Running 
2016-03-25 08:25:30,475 WARN  (com.serotonin.m2m2.rt.dataSource.PollingDataSource$2.execute:226) - Mod2: poll scheduled at 2016/03/25 08:25:30.000 aborted because Task Currently Running 
2016-03-25 08:25:30,478 WARN  (com.serotonin.m2m2.rt.dataSource.PollingDataSource.scheduleTimeout:117) - Mod3: poll scheduled at 2016/03/25 08:25:29.173 aborted because its start time of 2016/03/25 08:25:30.470 is more than the time allocated for in its poll period. 
2016-03-25 08:25:30,475 WARN  (com.serotonin.m2m2.rt.dataSource.PollingDataSource$2.execute:226) - Mod4: poll scheduled at 2016/03/25 08:25:29.172 aborted because Task Currently Running 

Errors continue for many more data sources.
</code></pre>
<p dir="auto">During these errors, the CPU idle time, according to mango's vmstat data source, has not fallen below 60%.<br />
High priority core pool size = 100 and<br />
High priority maximum pool size = 5000</p>
]]></description><link>https://forum.mango-os.com/post/11345</link><guid isPermaLink="true">https://forum.mango-os.com/post/11345</guid><dc:creator><![CDATA[Pedro]]></dc:creator><pubDate>Fri, 25 Mar 2016 15:49:10 GMT</pubDate></item><item><title><![CDATA[Reply to Alarms due to high priority task already running on Wed, 16 Mar 2016 17:09:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi Craig,</p>
<p dir="auto">We're going to be putting in more informative handlers to any place these errors can be generated going forward. The only information directly gleaned from that is 1) it is not a data source polling. That already implements a handler. 2) It is a repeating task.</p>
<p dir="auto">Repeating tasks reschedule themselves before attempting execution, so that it is 50 events in 8 days...<br />
176 hours, 3.5 hours/event could give you clues on the timing as it sits now (presuming they were all the same). Are the task IDs the same for each message? I am referring to the hex values after the '@' in TimeoutTask@84cbc5</p>
<p dir="auto">That could at least tell you if it is the same task that is attempting to run while an instance of it is already running, provided Mango was not restarted during the sample.</p>
]]></description><link>https://forum.mango-os.com/post/11262</link><guid isPermaLink="true">https://forum.mango-os.com/post/11262</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Wed, 16 Mar 2016 17:09:34 GMT</pubDate></item></channel></rss>