The world needs more Gwen IMO
“Gwen Stefani – What you waiting for”
So I happened to have my handy Job Activity Monitor up as I was looking to see if a job I kicked off finished when I noticed a status of “Waiting for Worker Thread”. I can’t say that I’ve seen this message before so I started looking around as to what else was running at this time.
I had a couple PowerShell jobs running and this job that was “waiting for a worker thread” was a PowerShell job as well. I called my best friend Google up to see if there was something quick and easy out there to help me figure this one out and I got sent here:
specifically…. “Note Microsoft SQL Server 2005 stores the max_worker_thread setting in the syssubsystems table in the msdb system database instead of in the registry. The syssubsystems table can be updated to reflect a non-default max_worker_thread setting.”
So I queried the syssubsystems table in msdb and guess what I found….
PowerShell by default has a max_worker_threads value of 2.
So a quick update to that value (in DEV… you didn’t actually think I would update a system table value in production did you?). I kicked off more than 2 jobs that called PowerShell scripts and BOOYEAH problem solved. Now I just bumped this up to 5 because I wanted to do some investigation as to any “gotchas” from messing with this value.
(so far I haven’t found any but I’ll update this post if any come up)