ArrcSOC GP Service Memory consumption

Discussion created by spiskulaesriuk-esridist Employee on Jan 16, 2013

I have written a custom .net geoprocessing tool which is exposed as a geoprocessing service with ArcGIS Server 10.1 SP1 . When the tool is run from ArcMap 10.1 SP1 i can see significant memory usage, say up to 1gb is consumed, but once the georpocessing is finished and i click 'Close' in the geoprocessing tool's dialog the memory is nicely released and ArcMaps consumption always comes back to the same level. I've run the same task for several times to check it and it seems there are no issues with ArcMap and memory consumption.

Once i publish the tool as a geoprocessing service and run it i can see under the task manager that the ArcSOC process associated with the gp service keep eating up more and more memory and even once the processing is done the memory is never released.

Can you advice on how to maintain the geprocessing service in order to regain the memory? Because of high demand for memory the service can very quickly reach the point when system runs out of memory as it is not released!