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) :
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.
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.
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.