Job timout issue

avatar

Currently running 2026.2.5 in prod with sql as the backend and we started randomly getting the following.

Error executing job: PowerShell did not respond in a timely fashion. PowerShell Universal is currently waiting 120 seconds for PowerShell to start running the script. You can increase the timeout by setting the 'Job Handshake Timeout' setting in the Settings \ General \ Automation page. If you are still experiencing issues, you may need to consider increasing the resources available on your system or take advantage of the Random Delay parameter for schedules to stagger jobs.

We can usually just re-run these jobs but this is a workaround at best.

All Comments (6)

avatar

Hello Michael,

Thank you for the details, having the exact error text helps a lot.

This error comes from the job handshake, the moment PowerShell Universal starts a new PowerShell process for a job and waits for that process to report that it is ready.

That wait covers only the process startup, not your script.

So a 120 second stall means something is slowing down or blocking the launch of the process on the server.

Since your Job Handshake Timeout is already at 120 seconds, four times the default of 30, raising it again is unlikely to solve this.

The next step is to find what holds the process back.

To reduce the failures in the meantime, here are two things you can do now:

To find the cause, could you email the following to service@devolutions.net instead of posting it here?

Logs can contain server names, paths and account names, and email keeps them out of this public thread.

Please include a link to this thread in your email so we can match it to your request.

  • The system log that covers one failed job, from %ProgramData%\PowerShellUniversal\Logs\System, with the time of the failure.

  • Whether the failing jobs use a Run As credential, and which environment they run in, for example PowerShell 7 or Windows PowerShell 5.1.

  • Whether PowerShell Universal runs as a Windows service or under IIS, and how many nodes share the SQL database.

  • Roughly how many jobs start at the same time when the failures happen, and whether the failures cluster at certain times or on one node.

  • When this started, and whether anything changed around that time, such as an upgrade, an antivirus update, new schedules or server changes.

The system log tells us whether the PowerShell process exited early or never answered, and each case points to a different cause.

Once we have this, we can narrow down where the startup time goes.

Best regards,

Patrick Ouimet

avatar

I sent the email yesterday afternoon

avatar

Hello michaelhanson1458,

Unfortunately, we didn't receive any logs or any new cases related to your email.

I will open a new case and send you a secure link to share your logs.

Best regards,

Patrick Ouimet

avatar

Do you have an email i send you those logs? I got your email for the file upload but its making me create an account and  MFA and all that jaz

The system log that covers one failed job, from %ProgramData%\PowerShellUniversal\Logs\System, with the time of the failure.

  • I have attached the logs. The job that failed was "Boarding\Get-TerminatedEmployees.ps1"

    ```

  • [00:03:23 VRB][Automation][190443] [INF] TeamsAPICall : Successfully Invoke-RestMethod

  • [00:03:23 VRB][Automation][190443] [INF] Id           : 190440

  • [00:03:23 VRB][Automation][190443] [INF] ComputerName : ESPR10617

  • [00:03:23 VRB][Automation][190443] [INF] Reason       : Error executing job: PowerShell did not respond in a timely fashion. PowerShell Universal is currently waiting 120 seconds for PowerShell to start running the script.

  • [00:03:23 VRB][Automation][190443] [INF]                You can increase the timeout by setting the 'Job Handshake Timeout' setting in the Settings \ General \ Automation page.

  • [00:03:23 VRB][Automation][190443] [INF]                If you are still experiencing issues, you may need to consider increasing the resources available on your system or take advantage of the Random Delay parameter for schedules to stagger jobs.

  • [00:03:23 VRB][Automation][190443] [INF]                

  • [00:03:23 VRB][Automation][190443] [INF] Script       : Boarding\Get-TerminatedEmployees.ps1

  • [00:03:23 VRB][Automation][190443] [INF] StartTime    : 11/1/2026 5:00:36 AM

  • [00:03:23 VRB][Automation][190443] [INF] TeamsChannel : Boarding

  • [00:03:23 VRB][Automation][190443] [INF] EndTime      : 11/1/2026 5:03:19 AM

  • [00:03:23 VRB][Automation][190443] [INF] Identity     : 

  • [00:03:23 VRB][Automation][190443] [INF] Parameters   : {[All, <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">

  • [00:03:23 VRB][Automation][190443] [INF]                  <B>true</B>

  • [00:03:23 VRB][Automation][190443] [INF]                </Objs>]}

  • [00:03:23 VRB][Automation][190443] [INF] 

    ```

Whether the failing jobs use a Run As credential, and which environment they run in, for example PowerShell 7 or Windows PowerShell 5.1.

  • This is running from powershell 7 and not using a run as

Whether PowerShell Universal runs as a Windows service or under IIS, and how many nodes share the SQL database.

  • Psu runs as service. 1 node 

Roughly how many jobs start at the same time when the failures happen, and whether the failures cluster at certain times or on one node.

  • This is a child job that is called by "Boarding\Process-BHRTermsList.ps1" which is a scheduled job that runs at midnight on the 1st and the 15th of each month 

  • I asked copilot to summarize my schedules.ps1...

    Yep — in  .universal\schedules.ps1  I counted:

    • • Total scheduled jobs: 42

    • • Scheduled at midnight (00:00): 15

    • • Scheduled at the same time as at least one other job: 29 jobs across 5 shared time slots

    • Shared slots I found:

    • •  0 0 ...  → 15 jobs

    • •  0 8 ...  → 7 jobs

    • •  0 6 ...  → 3 jobs

    • •  0 */2 ...  → 2 jobs

    • •  0 7 ...  → 2 jobs

When this started, and whether anything changed around that time, such as an upgrade, an antivirus update, new schedules or server changes..

  •  Nothing changed.

avatar

image.png

Also the two jobs that failed due to a handshake issue spawned at the same time? Could be this be a collision error? @Patrick Ouimet

We reviewed our EDR logs and nothing was interfering or blocking these processes from running. 

avatar

Hello Michael,

Thank you for the answers, the log excerpt and the screenshot, they help a lot.

To answer your question, this does not look like a collision where one job blocks the other.

It looks more like both jobs were caught in the same startup rush.

Your screenshot shows it well, since DHCP\Get-Scopes.ps1 and Boarding\Get-TerminatedEmployees.ps1 are child jobs of two different schedules, yet both started at 12:00:36 AM and both failed within a second of each other at 12:03 AM.

Two different scripts failing at the same second points to the server being busy at that moment, not to anything in the scripts themselves.

In the PowerShell 7 environment, each job starts its own PowerShell process, and that process must check in with the server before the Job Handshake Timeout runs out.

At midnight, your midnight schedules, up to 15 of them, start together, and Process-DHCP-Data and BHR Term Process then start their child jobs on top of them.

On a single node, all of these new processes compete for CPU, disk and security scanning at the same time, so a few of them can miss the 120 second window.

This would also explain why the failures look random, and why a re-run works once the server is quiet again.

Here is what we suggest to spread the load:

  • Turn on Random Delay for the midnight schedules, so each one starts at a random point within 60 seconds instead of all at once: https://docs.devolutions.net/powershell-universal/automation/schedules

  • For a wider window, add both -RandomDelay and -RandomDelayMaximum to those New-PSUSchedule lines in .universal\schedules.ps1, for example 300 for up to five minutes.

  • If the timing allows, move the BHR Term Process and Process-DHCP-Data schedules away from midnight and away from each other, for example to 12:15 AM and 12:30 AM, so their child jobs do not start in the same rush.

  • In the parent scripts, add a short pause between child job launches so they do not all start in the same second.

  • Keep the PowerShell Universal folders and executables excluded in your EDR, as listed in the Antivirus Configuration section I shared earlier.

Even when the EDR blocks nothing, scanning a new process can slow its start without leaving a block event.

For the logs, you do not need to create an account.

You can simply reply to our email from service@devolutions.net with the subject "00135551: Logs" and attach the file there, zipped if it is large.

The most useful file now is the full System log for November 1, from %ProgramData%\PowerShellUniversal\Logs\System.

It will show what the server was doing between midnight and 12:04 AM, and how many jobs it was starting at that moment.

If you can, please also tell us:

  • The number of CPU cores and the amount of memory on the server.

  • Whether these failures only happen around midnight, or also in your 6 AM and 8 AM slots.

  • Whether a SQL Server backup or maintenance task runs around midnight.

Best regards,

Patrick Ouimet