Adjusting the size of poll data queues

Database problems or heavy polling loads can cause pollers to run out of memory if the queue of poll data for writing to the NCPOLLDATA database becomes too large. To monitor and avoid this problem, you can set a limit on the size of the queue. The limit is defined as the number of batches. If the limit is exceeded, you are alerted in the log and in the Event Viewer. Then, the poller reduces the queue size by discarding the queued data. The discarded data is written to another file.

Before you begin

Set the poller debug level to 4.

Procedure

  1. To set the limit, in the $NCHOME/etc/precision/NcPollerSchema.cfg file for your poller, set the PollDataQueueLimit parameter to a suitable number of batches.
    The following example shows how to set the limit to 50 batches of queued data:
    update config.properties set PollDataQueueLimit = 50;
  2. Monitor the poller log file in $NCHOME/log/precision and the Event Viewer for messages and alerts.

Results

When the queue exceeds the limit that is specified by the PollDataQueueLimit parameter, the following actions are taken:

  • In the Event Viewer, an alert is displayed. For example:
    ItnmPollerPolicyDataQueueFull: poller NCOMS; poll data queue has exceeded capacity, off loading data to file
  • A message is written to the log. For example:
    2013-04-19T12:37:58 [CDataQueue::ProcessValue] Queue size exceeds threshold, discarding data: policyId:122:templateId:39:monitoredInstanceId:2212:monitoredObjectId:3:pollTime:1387232947:tdwTime:1131216222944000:errorCode:111:value:0
  • The poll data is discarded from the queue and written to a $NCHOME/log/precision/ncp_poller.poller name.domain.polldata file, for example, ncp_poller.poller name.domain.data. The data is for information only and cannot be inserted back into the polling database. For example:
    MONITOREDOBJECTID,5, MONITOREDINSTID,184, POLLTIME,1447960873, ERRORCODE,100, 
    VALUE, 0 
    MONITOREDOBJECTID,6, MONITOREDINSTID,184, POLLTIME,1447960873, ERRORCODE,100, 
    VALUE, -1 
    MONITOREDOBJECTID,5, MONITOREDINSTID,248, POLLTIME,1447960873, ERRORCODE,100, 
    VALUE, 100

What to do next

If the limit is exceeded:

  • Resolve the size of the poll data queues. For example, create more pollers, or contact your database administrator.
  • Clear the alert from the Event Viewer.
  • Clear the .polldata file. The file is not cleared or rotated automatically.