I got this exception when I was trying to deploy my sharepoint app.
Error occurred in deployment step ‘Install App for SharePoint’: The requested service, ‘http://myserver:32843/d977900ececd44f2b415fe98eb317ede/AppMng.svc’ could not be activated
So I used that url and paste it into a browser and I came up with this:
Memory gates checking failed because the free memory (58085376 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
Then I checked the Task Manager, and I found a process NodeRunner.EXE with about 4GB of ram used.
Solution is here: