Device publisher is too
busy log message
The Publisher component of the runtime handles the
reading of device variables for Data event type triggers, Variable Group event type
triggers and Data
mappings.
Each of these items is configured with a frequency in
milliseconds to read the device variable. The parameter for
this is Priority (ms) and has a selection
list of the frequency rate in milliseconds. For each instance of reading the device variable, the
item's Condition is checked. If the
condition has been met, the trigger is fired (executed) or
the the data mapping is performed.
The Publisher keeps track of all of the device variables and their frequencies and attempts to read the device variables values by issuing an internal variable read command to the device driver that supports the device that the variable belongs to. Multiple references to a single device variable at the same or different frequencies are handled. The device drivers handle the communication to the physical devices using the commands and protocol supported by the physical devices.
Most device drivers interface with the physical devices with a demand read/demand write mechanism, meaning the driver must issue a command to the physical device to read a variable's value.
Some device drivers may support a publish/subscribe mechanism when communicating with the physical devices, and will be notified when the device variable changes.
The Publisher may not be able to read all of the device variables for a given frequency (the Priority (ms) parameter value) and get the responses from all of the device drivers for the variables before the next read cycle is scheduled to begin. When this happens, an Exception Logs message is generated and the Publisher continues with its reading of device variables. In other words, it is not a hard error that stops the Publisher.
Example Exception Log message
An Exception Logs message similar to this example will be logged:
2013-02-08 17:05:29,703 ERROR Publisher Device publisher is too busy. (Target interval: 50) (Actual interval: 94) |
Where the target interval (50 in this example) is the Priority (ms) value that could not be completed, and the actual interval (94 in this example) is how long it took to complete all of the device variable reads for the priority.
Determining the cause
Since the Publisher is handling multiple device variables for a given frequency, it is the total amount of time to read all device variables at the given frequency that could not be completed. This may not be indicating a single device is performing slower than normal, but may be caused by normal variance in device and network communication performance and load on the system.
The Administration -> System Variables tab displays values for the Publisher's function, and can be viewed to help understand the Publisher's status.
For example:
The values are grouped by an index that refers to the Priority (ms) parameter in the configured items. For example index 1 is for the first priority value, which is 50 milliseconds.
The values have the following description:
Value | Description |
---|---|
device_count | The number of devices that have variables that are being read for the given Publisher priority. |
Iteration_count | The number of read cycles for the given Publisher priority. |
last_time | The read time for the last read cycle for the given Publisher priority. |
miss_count | The number of missed read cycles for the given Publisher priority. |
miss_count_current | The number of missed read cycles for the given Publisher priority. |
miss_percent | The percentage of missed read cycles compared to the total iteration count for the given Publisher priority. |
reading_count | The number of missed read cycles for the given Publisher priority. |
var_count | The number of variables that are being read for the given Publisher priority. |
The miss_count, miss_count_current, and miss_percent values will give an indication that the Publisher is not able to read all of the variables for the given priority within the priority's read cycle.
- Review the priorities being used and the
application logic as to why that priority is
appropriate.
- Review the total number of variables (in different
devices) and the normal performance for reading
variables for each device. A device's read and write
performance statistics are shown on the Device panel.
For more information, see Defining, viewing, and controlling
devices.
- Review the data event type triggers that are
using the device variables. For more information, see
Data.
- Review the data mappings that are using the device
variables. For more information, see Defining, viewing, and controlling data
mappings.
- Review the variable groups that are using the device variables. For more information, see Defining, viewing, and controlling variable groups.