Unable to start a local compute server

There are existing discussions regarding this matter, however, the root cause remains elusive.

I’ve encountered issues with the Rhino Compute Server hosted on a high-end EC2 instance. Testing its capacity by running nine jobs simultaneously has resulted in failure (We have min of 100 such jobs run in parallel). Each job typically requires a 10 minutes to 50 minutes to complete. After a short duration, the following error emerges, leading to the failure of all ongoing jobs:

“Error: Unable to start a local compute server error.”

Interestingly, running only three or four jobs concurrently seems to work without any issues, completing all tasks successfully.

It’s worth noting that once this error occurs, subsequent calls to the Rhino server fail due to its unavailability.

Could there be a predefined limit to Rhino Compute that we should be mindful of? And are there any solutions available to address this limitation?

2024-03-07 08:07:12.846 +00:00 [ERR] Connection ID “16645304240746528780”, Request ID “4000000d-0004-e700-b63f-84710c7967bb”: An unhandled exception was thrown by the application.
System.Exception: Unable to start a local compute server
at rhino.compute.ComputeChildren.LaunchCompute(Queue1 processQueue, Boolean waitUntilServing) in /home/runner/work/compute.rhino3d/compute.rhino3d/src/rhino.compute/ComputeChildren.cs:line 224 at rhino.compute.ComputeChildren.GetComputeServerBaseUrl() in /home/runner/work/compute.rhino3d/compute.rhino3d/src/rhino.compute/ComputeChildren.cs:line 96 at rhino.compute.ReverseProxyModule.<>c.<InitializeChildren>b__5_0() in /home/runner/work/compute.rhino3d/compute.rhino3d/src/rhino.compute/ReverseProxy.cs:line 41 at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object ) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread , ExecutionContext , ContextCallback , Object ) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& , Thread ) --- End of stack trace from previous location --- at rhino.compute.ReverseProxyModule.AwaitInitTask() in /home/runner/work/compute.rhino3d/compute.rhino3d/src/rhino.compute/ReverseProxy.cs:line 116 at rhino.compute.ReverseProxyModule.ReverseProxyPost(HttpRequest req, HttpResponse res) in /home/runner/work/compute.rhino3d/compute.rhino3d/src/rhino.compute/ReverseProxy.cs:line 187 at Carter.CarterExtensions.<>c__DisplayClass1_0.<<CreateRouteHandler>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at rhino.compute.ApiKeyMiddleware.InvokeAsync(HttpContext context) in /home/runner/work/compute.rhino3d/compute.rhino3d/src/rhino.compute/ApiKeyMiddleware.cs:line 35 at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT1.ProcessRequestAsync()

Hi Andy,

Thank you for your response.

Our Rhino.Compute instance is hosted on EC2 with very high specifications.

We’re accessing the Rhino server through a .NET Core project capable of running parallel jobs.

Here’s an overview of our requirements:

Initially, we convert a STEP file to 3DM using a custom endpoint.

Following that, we perform numerous geometric calculations such as:

  • /rhino/geometry/intersect/intersection/brepplane

  • /rhino/geometry/curve/split

  • /hiddenlineservice/hiddenlineelevation

  • Boolean difference, and several others.

ISSUE:

When running a single job that encompasses all the above operations, no issues arise.

However, when attempting to run more than a few jobs concurrently, failures occur.

NOTES:

The conversion of a STEP file to 3DM takes a significant amount of time, and the error only manifests when this step is included.

Without this conversion, even with multiple concurrent calls (e.g., 5 or 20), no errors occur.

HELP NEEDED:

Is it possible to perform these operations locally without relying on the Rhino server?

  • /rhino/geometry/intersect/intersection/brepplane

  • /rhino/geometry/curve/split

  • /hiddenlineservice/hiddenlineelevation

Your assistance is greatly appreciated.

@davidmccuaig are you able to fix this issue?

@AndyPayne
@mcneelsoftware
@fraguada
@daniel4dev

Is it possible to convert a STEP file to 3DM locally without relying on the Rhino compute serve .

What do you mean locally? Are you asking if it’s possible to create a .3DM from an imported STEP file? Of course, if you’ve got a rhino license then you can do this easily with the Rhino application or even script this using Grasshopper. Alternatively, you can use the Rhino3dm library. Using this library, you should be able to read/write your own Rhino files. Here’s a thread which might help in getting started.

Also, it seems from your post that you think the issue could be occurring in the part of your process where you convert a STEP into a 3DM. Is it possible to share the code you’re using for that part so we can take a look and see if there are any errors we might be able discern?

I would like to convert .step to .3dm using rhino3dm.
Is it possible?

@Rama_Shashank rhino3dm knows about the 3dm part, it knows nothing about the STEP part. If you have a way to read and parse the STEP file, then you can use rhino3dm to write the logic to convert the stuff you’ve parsed in the STEP to 3dm.

Ok, so i don’t have any third party plugins installed on my Rhino compute server.
And when i run only few jobs all seems to be working fine.

When i do run more jobs like 8+ and each job will have at least 500 calls to rhino server. Some will be calling our custom endpoints.

All of a sudden even i see all compute.geometry on server are idel.