Workflows are running slow / Workflows Performance issue
Error 1:
Workflows
are running slow or have workflow performance issues.
Solution
1:
The performance issue was caused by the logic in one of the SharePoint workflows which s
faulty/ Corrupted.
Solution
2:
Prevents
excessive growth of the Message Container databases which may result in the
maximum Topic quota is exceeded and no workflow can be started.
Run the
below SQL query in SQL server management studio
1.
Select count(*) from
[SBMessageContainer01].[dbo].[MessageReferencesTable]
Total
Count for Database
2.
Select count(*) from
[SBMessageContainer01].[dbo].[MessageReferencesTable] where state=0
Total
Count of active workflows
3.
Select count(*) from
[SBMessageContainer01].[dbo].[MessageReferencesTable] where state=2
Total
Count of deferred messages- WF instance is deleted bit its deferred messages are
not deleted. Leading to an increase in topic size and exceeding the topic Quota.
Output:
3.
if the output of the query is more than
100,000 Messages.
4.
As the result of the above query
generated millions of workflow instances which has caused the service bus to throttle
since it has exceeded it upper limit of 100,000 messages in the system at one
time. While restarting the workflow Manager backend service from all workflow
manager installed servers, it was used to clear out the logs and provided a
small window to process the messages again until the throttling limit was
reached again.
5.
You have an SQL monitor agent or job
running all time and checking the number of sessions of workflow instances by
running the below command. In case the count (*) is more than 1 million or 100K, it
should notify a respective admin. Which was pilling up the workflow instances in the database.
Select
SessionId, count() as total from[MessageReferencesTable] group by sessionId
order by total desc
6.
After cleaning out those instances we
are able to resolve the performance issue also delete those corrupted
SharePoint Workflows.
0 Comments