Memory leak?

Hi @AndyPayne ,

We are experiencing what looks like a memory leak on our process using latest Compute on a AWS r5.large 16Go server.

We are sending a bunch of parameters to a big Grasshopper definition that produces geometries a few hundreds times a day, and we are observing the memory usage building up during the day (we restart the server every night) :


Our user base is slowly growing up and the nightly reboots will soon not be enough.

Is it common? What is the best way to release all memory usage between each call?

Thanks

I think what you may need to do is to configure Recycling on your App Pool in the IIS Manager. You can read more about process recycling here. This is not setup as default in IIS, but I don’t think it should be too hard to configure. Simply open your IIS Manager and click on the Application Pool tree menu item on the left hand pane. From there, select the RhinoComputeAppPool and then find the button on the right that says Advanced Settings. At the bottom of this dialog, you should see a section which lets you configure the Recycling properties.

Thank you, we did this configuration and I will report with the result

Hi @AndyPayne ,

thanks for the hint to the Recycling option, which is nice as some sort of workaround.

However, this doesn’t fix the underlying issue and also causes service interruptions while restarting Compute. There is definitely a memory leak when solving Grasshopper definitions repeatedly. In times of high demand, our server becomes unresponsive due to this issue.

See also the findings of other people here: Rhino Compute service memory leak

I can see that the GH_Document in the GrasshopperDefinition is never disposed and probably should be, but I also found that even disposing it still doesn’t solve the leak entirely, so maybe there is a leak in Grashopper itself.

1 Like

Hi @AndyPayne
We have another issue on our Compute server where our disk file up quickly during the day, and it seam to be in the

C:\Users\RhinoComputeUser\AppData\Local\Temp

directory, where there is a lot of the same nuget package:


Thanks !