API - Error executing job: Did not receive port from client process

Product: PowerShell Universal
Version: 2.11.1

We have a ticketing system that calls various APIs to preform some actions. We have a good number of requests that fire off at the same time.

Is the server not handling the requests due to a performance thing?

Invoking script 49
2022-06-10 17:16:57.040 -05:00 [INF] Job 7398 started.
2022-06-10 17:16:57.063 -05:00 [INF] Evaluting claims for <redacted>, Cache: True
2022-06-10 17:16:57.094 -05:00 [INF] Starting job using CreateProcessAsUser.
2022-06-10 17:16:57.144 -05:00 [INF] Error executing job 7392: Did not receive port from client process.    at UniversalAutomation.Services.GrpcExecutionService.ExecuteScript(Job job, ExecutionEnvironment environment, executeScriptRequest request, ExecutionCallback executionCallback) in D:\a\universal\universal\src\Universal.Server\Services\Automation\GrpcExecutionService.cs:line 118
   at UniversalAutomation.ExecutionService.ExecutePowerShell(Script script, IEnumerable`1 parameters, Job job, Schedule schedule, ExecutionCallback callback) in D:\a\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 628
   at UniversalAutomation.ExecutionService.TryExecute(Job job, Schedule schedule) in D:\a\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 327
   at UniversalAutomation.ExecutionService.Execute(Job job, Schedule schedule) in D:\a\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 246 System.Exception
2022-06-10 17:16:57.170 -05:00 [INF] Error executing job 7393: Did not receive port from client process.    at UniversalAutomation.Services.GrpcExecutionService.ExecuteScript(Job job, ExecutionEnvironment environment, executeScriptRequest request, ExecutionCallback executionCallback) in D:\a\universal\universal\src\Universal.Server\Services\Automation\GrpcExecutionService.cs:line 118
   at UniversalAutomation.ExecutionService.ExecutePowerShell(Script script, IEnumerable`1 parameters, Job job, Schedule schedule, ExecutionCallback callback) in D:\a\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 628
   at UniversalAutomation.ExecutionService.TryExecute(Job job, Schedule schedule) in D:\a\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 327
   at UniversalAutomation.ExecutionService.Execute(Job job, Schedule schedule) in D:\a\universal\universal\src\Universal.Server\Services\Automation\ExecutionService.cs:line 246 System.Exception
2022-06-10 17:16:57.187 -05:00 [INF] Evaluting claims for <redacted>, Cache: True

We are still seeing this when a lot of api calls are coming in at a time. We are going to bump up the number of cores the PSU server lives on and see if that addresses the issue.

That’s likely what’s happening. You can try to increase the resources or you can try to tweak the JobHandshakeTimeout value in appsettings.json.

  "UniversalAutomation": {
    "JobHandshakeTimeout": 5,
    "JobDebugging": false,
    "ContinueJobOnServerStop": false
  },

I will give that a try as well and report back.