Wednesday, 18 September 2013

Search Service Application : Memory gates checking failed because the free memory (314294272 bytes) is less than 5% of total memory.


Today’s issue is related to Search Service Application. We have our new deployment and noticed that search was not working.
We were getting a following error in event viewer:


WebHost failed to process a request.

 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/57773521

 Exception: System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.svc' cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (314294272 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.. ---> System.InsufficientMemoryException: Memory gates checking failed because the free memory (314294272 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.

   at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)

   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)

   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

   --- End of inner exception stack trace ---

   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)

 Process Name: w3wp
 Process ID: 11704

This issue is related to memory. We have only 8 GB memory in our development environment. Since we had deployment and then full crawl, and there are total 7 web applications in content source to be crawl. So lots of memory gets consumed and search service started throwing such types of an exceptions.
 
We killed some not required processes just to free the some memory, did the IISRESET and wonder happened search service back to normal state and result is shown.

Other solution might be by restarting the following services
  1.        SharePoint Search Host Controller
  2. SharePoint Server Search 15
This will release all the consumed memory.
 
Thanks!
Enjoy reading J
Feel free to comment / feedback if any or if you have any query J



No comments: