Customizing the Event Queue Configuration Settings
- Last UpdatedOct 19, 2020
- 5 minute read
There are five configuration settings that can be adjusted according to your specific needs:
-
EventPullIntervalInMilliSeconds
-
MaxEventsToDequeue
-
MaxTotalPendingEventsInQueueBeforeLogWarning
-
MaxMinutesToProcessEventBeforeLogWarning
-
EnableEventQueueHistory
EventPullIntervalInMilliseconds
Event Requests are stored in a queue which gets polled at an interval. When event requests are found, they are processed by the Intelligence Server. You may adjust the interval that determines the frequency of polling the queue. The name of the setting is EventPullIntervalInMilliSeconds and it is pre-configured with a value of 1 minute; i.e. 60000 milliseconds.
Note: The default value of 1 minute should be optimal for most cases. However, if you only have a few events per minute and it is critical that those events are processed within seconds, then you may consider adjusting this setting to a lesser value. Conversely, setting it too low (e.g.: 1 second) and then consuming many events may lead to SQL Server deadlocks, which are automatically resolved by the SQL Server engine.
To configure the EventPullIntervalInMilliSeconds setting
-
Open the EMIRuntimeConfigurator.xml file in a notepad editor with the "Run as Administrator" option from the Intelligence Installation Bin directory. For example: C:\Program Files (x86)\Wonderware\Intelligence\Bin.
-
Edit the XML file and update the following information, which is set to 60000 milliseconds (1 minute) by default:
<EventPullIntervalInMilliSeconds>60000</EventPullIntervalInMilliSeconds>
-
Save and close the file.
-
Restart the Intelligence Runtime service for the EventPullIntervalInMilliSeconds setting to take effect after changing this setting in the EMIRuntimeConfigurator.xml file.
MaxEventsToDeQueue
When the Intelligence Server polls the Event Queue for pending event requests, the server is capable of processing more than one measure or dimension at a time. Because processing events can be a processor intensive operation (e.g.: measures with many calculations span multiple threads), the number of different data items to process can be controlled; increased or decreased depending on hardware.
The name of the setting is MaxEventsToDequeue and it is pre-configured with a value of 1 data item. For instance, if a measure named Measure_001 is processed, then no other event requests will be processed until the event for Measure_001 has finished processing. Alternatively, if MaxEventsToDequeue was configured with a value of 2, then one additional event request (e.g.: for Measure_002) would process in addition to the currently processing data item. Once both events have finished processing, another two can be processed.
Note: When considering a custom value that fits your BI Gateway environment, you should include several factors that will have an impact. BI Gateway Model considerations include the number of measures and calculations per measure, as well as the frequency of refreshes, whether through configuration or through requests of the Event API. Additionally, you may consider the frequency of TDD updates, which have a down-stream effect on measure re-processing. Computer hardware considerations include CPU, Memory, and any other applications that consume the same hardware as your Intelligence Server.
To configure the MaxEventsToDequeue setting
-
Open the EMIRuntimeConfigurator.xml file in a notepad editor with the "Run as Administrator" option from the Intelligence Installation Bin directory. For example: C:\Program Files (x86)\Wonderware\Intelligence\Bin.
-
Edit the XML file and update the following information, which is set to 1 by default:
<MaxEventsToDequeue>1</MaxEventsToDequeue>
-
Save and close the file.
-
Restart the Intelligence Runtime service for the MaxEventsToDequeue setting to take effect after changing this setting in the EMIRuntimeConfigurator.xml file.
You can configure the Event Queue to display warning messages in the ArchestrA Logger when the number of currently pending events or the processing requests reaches a defined threshold.
Note: This may occur if the Intelligence Service receives more requests than it can process, given many variables including hardware, or if MaxEventsToDequeue is configured lower than the default value.
MaxTotalPendingEventsInQueueBeforeLogWarning
When the number of event requests that haven’t been processed reaches a certain point, a warning message will be displayed in the ArchestrA Logger. The name of the setting is MaxTotalPendingEventsInQueueBeforeLogWarning and it is pre-configured with a value of 200 events.
To configure the MaxTotalPendingEventsInQueueBeforeLogWarning setting
-
Open the EMIRuntimeConfigurator.xml file in a notepad editor with the "Run as Administrator" option from the Intelligence Installation Bin directory. For example: C:\Program Files (x86)\Wonderware\Intelligence\Bin.
-
Edit the XML file and update the following information, which is set to 200 by default:
<MaxTotalPendingEventsInQueueBeforeLogWarning>200</MaxTotalPendingEventsInQueueBeforeLogWarning>
-
Save and close the file.
-
Restart the Intelligence Runtime service for the MaxTotalPendingEventsInQueueBeforeLogWarning setting to take effect after changing this setting in the EMIRuntimeConfigurator.xml file.
MaxMinutesToProcessEventBeforeLogWarning
When an event that is processing takes longer than expected, a warning message will be displayed in the ArchestrA Logger. The name of the setting is MaxMinutesToProcessEventBeforeLogWarning and it is pre-configured with a value of 120 minutes.
This may occur for several reasons. For instance, if the start and end date range of the event request span a long period, many time slices will need to be re-processed which may take longer than smaller date ranges. Another reason may be related to the fact that the Event Queue consolidates ‘like’ events; events that overlap in date ranges. If many events have overlapping date ranges, then the date range of the consolidated event is expanded and it may take longer than originally expected. Once the event has finished processing, the warning will stop.
To configure the MaxMinutesToProcessEventBeforeLogWarning setting
-
Open the EMIRuntimeConfigurator.xml file in a notepad editor with the "Run as Administrator" option from the Intelligence Installation Bin directory. For example: C:\Program Files (x86)\Wonderware\Intelligence\Bin.
-
Edit the XML file and update the following information, which is set to 120 by default:
<MaxMinutesToProcessEventBeforeLogWarning>120</MaxMinutesToProcessEventBeforeLogWarning>
-
Save and close the file.
-
Restart the Intelligence Runtime service for the MaxMinutesToProcessEventBeforeLogWarning setting to take effect after changing this setting in the EMIRuntimeConfigurator.xml file.
EnableEventQueueHistory
As a temporary diagnostic tool, you may enable a built-in trigger that writes changes to the EventQueue into a table called EventQueue_History, located in the Model schema of the Data Store. This data may be useful if you need to analyze how many events are processing per day or if you would like to see which date ranges have been consolidated into a single event request.
The name of the setting is EnableEventQueueHistory and it is turned off by default.
Caution: Enabling this trigger will accumulate multiple database rows per event. Make sure to disable this setting once done with diagnosis. The data in EventQueue_History can be purged once done with diagnosis.
To configure the EnableEventQueueHistory setting
-
Open the EMIRuntimeConfigurator.xml file in a notepad editor with the "Run as Administrator" option from the Intelligence Installation Bin directory. For example: C:\Program Files (x86)\Wonderware\Intelligence\Bin.
-
Edit the XML file and update the following information, which is set to False by default:
<EnableEventQueueHistory>False<EnableEventQueueHistory>
-
Save and close the file.
-
Restart the Intelligence Runtime service for the EnableEventQueueHistory setting to take effect after changing this setting in the EMIRuntimeConfigurator.xml file.