this days, I updated Service Management Automation (SMA) in our production environment from version 2016 UR7 to version 2019.
after the update, I had an issue with Windows Azure Pack, which couldn’t display the dashboard for the Automation provider.
after some research, i found out, that the root cause was some months earlier. we have a lot of concurrent jobs running and some times the SMA workers was overloaded and all new jobs where hanging in the queue. the solution I found on some other websites, was to mark this queued jobs as failed inside the database and then restart the worker service:
-- New Jobs
UPDATE [Core].[Jobs] SET StatusID=5 WHERE StatusID=1
-- Running Jobs
UPDATE [Core].[Jobs] SET StatusID=5 WHERE StatusID=3
-- Suspended Jobs
UPDATE [Core].[Jobs] SET StatusID=5 WHERE StatusID=8
after setting this jobs to failed state, I had to configure the Runbook worker to start only one Runbook per Sandbox process in the file C:\Program Files\Microsoft System Center\Service Management Automation\Orchestrator.Settings.config:
<add key="MaxRunningJobs" value="1"/>
<add key="TotalAllowedJobs" value="1"/>
the Runbook worker could now be restarted and was working properly again. Stability was much better, than before.