views:

48

answers:

0

I would like to restart Windows Service after memory consumption of it reaches certain limit.

Scenario:

I have WCF Service hosted on Windows Service. WCF service keeps on increasing in memory consumption after every call without releasing significantly as seen from Task Manager. It results in OutOfMemory exception. I would like to restart Windows Service or ServiceHost hosting windows service after it reaches certain memory limit.

Challenge I face is to find out how much memory is currently consumed by Widows Service/ServiceHost and restart it from out side or from same application.

I have already posted regarding Memory Consumption issue but did not found any answer. http://stackoverflow.com/questions/3751473/wcf-windows-service-not-releasing-resources-memory-after-every-call