Master Data Services HttpWebRequest WebException RemoteServer error

This error suddenly appeared on all Silverlight pages related to SQL Master Data Services (2014) during a project i was working on for a Customer. The pages not using Silverlight did work without any problems at all.

You should always be aware that the event log is very helpful at troubleshooting when experiencing a program that stops working or suddenly disappears. Looking in to what could be causing the problem i there started by go there.

This revealed that there was an error which were consistent with my issue:

Memory gates checking failed because the free memory (864960512 bytes) is less than 5% of total memory

Memory gates checking failed because the free memory (864960512 bytes) is less than 5% of total memory


 
 

 

 

 

Exception: System.ServiceModel.ServiceActivationException: The service ‘/MDS/Service/Service.svc’ cannot be activated due to an exception during compilation. The exception message is: Memory gates checking failed because the free memory (864960512 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 (864960512 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.

After going through the error message it was clear that i had to do something about the memory consumption & the settings. Therefore i only found two possible alternatives to solve the problem:

Limiting memory consumption

The machine was equipped with 32 GB which were all in use. Looking in to what was consuming alle the memory i noticed that were running an instance of SQL Server to power MDS and at the same time acting as a data warehouse. Normally i always recommend NOT running a web server on the same machine where i run SQL server. This was unfortunately not an option at this customer because of limited availability of ressources.

To solve the issue i visited the settings for the SQL server and noticed that minimum memory consumption was set to 0 and the maximum was set to 2 terabytes. I ended up setting the minimum consumption to 10.240 MB and maximum to 20.480 MB.

I chose 20480 MB as a maximum to ensure that there would always be available memory to run both Windows, MDS and Integration Services t the same time.

Go to Install Master Data Services if you want to know more about about setting up Master Data Services. There is also a description on how to set up MDS on a separate server

Changing the config-file
In this situation changing the threshold to less than 5 percent of the memory consumption is not recommended to ensure that the services has enough memory. Especially because less then 1.638 MB could give performance issues.

If you server is equipped differently (much more memory) i would give sense to change this configuration. This is done by setting the minFreeMemoryPercentageToActivateService in your web.config to a lower value:

Read more about serviceHostingEnvironment here.

Bent Pedersen
Member since November 20, 2016

I am a Senior Business Analytics Architect at Kapacity A/S, where I have been working with enterprise customers on solutions with SSAS Tabular, Datazen and SQL for the last three years. During the past year, he concentrated on working with devOps, Automation, testing and simplifying development processes for Microsoft BI.

Comments

  • LastZella 3 months ago

    I see you don’t monetize your site, don’t waste your traffic, you can earn additional bucks every month because you’ve got high quality content.
    If you want to know how to make extra bucks, search for: Mertiso’s tips best adsense alternative

  • NolanSmall 2 months ago

    I have checked your website and i’ve found some duplicate content, that’s
    why you don’t rank high in google, but there is a tool that can help you to create 100% unique articles, search for; Boorfe’s tips unlimited content

Your email address will not be published. Required fields are marked *