Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Pending tasks may be seen to accumulate more than normal. Pending tasks are typically a few dozen (on large configurations) or less (on smaller configurations). When hundreds of Pending tasks are observed, there is likely a problem.
We can get an idea of where the problem is by examining the PendingTasks with this SQL Query:

Code Block
languagesql
SELECT pt.TaskId, t.TaskDesc, t.Owner, Count AS 'tasks'

...

 
FROM PendingTasks pt 
JOIN Tasks t ON pt.TaskId = t.TaskId GROUP BY pt.TaskId, t.TaskDesc, t.Owner

...

 
ORDER BY Count DESC 

If the Owner of excessive PendingTasks is Reader, SummaryMgr, or EventMgr, the time they are taking to read their historian data should be evaluated. Put the service(s) that are falling behind in their processing in High Debug for long enough to read all of their associated tags. This will typically be several minutes in these cases. The service will then record in its debug log file the times it starts and finishes reading each historian tag's data. However, determining from the log file which one or more of these tags may be taking excessive time to read is still tedious at best, and at worst a daunting task.

...

Resolution
To delete the orphaned tasks, the tasks can be deleted using SQL Query Analyzer or an SQL Batch job can be setup to periodically clean up the table using the code below:

Code Block
DELETE FROM Pendingtasks where Workstarted = 1 and Timestamp < getdate()-60

Audit Trail

The Audit Trail captures all configuration changes made by the Administrator or installed SIMs (hotfixes). Often one of the first courses of action in any troubleshooting situation is first to try and determine what has changed recently, as recent changes may be the cause of issues being experienced. The Audit Trail provides that facility along with who made those changes if they were logged on with their account. It should be noted though that this only captures actions performed mostly using the Administrator and not new or updated stored procedures introduced by those working directly in the database.
The Audit Trail gives the following information:

...