WCF&AppFabric :异常消息: 内存入口检查失败

bug描述

发件人信息: System.ServiceModel.ServiceHostingEnvironment+HostingManager/31242459 异常: System.ServiceModel.ServiceActivationException: 由于编译过程中出现异常,无法激活服务“xx.xamlx”。异常消息为: 内存入口检查失败,因为可用内存(310542336 字节)少于总内存的 5%。因此,该服务不可用于传入的请求。若要解决此问题,请减少计算机上的负载,或调整 serviceHostingEnvironment 配置元素上的 minFreeMemoryPercentageToActivateService 的值。。 ---> System.InsufficientMemoryException: 内存入口检查失败,因为可用内存(310542336 字节)少于总内存的 5%。因此,该服务不可用于传入的请求。若要解决此问题,请减少计算机上的负载,或调整 serviceHostingEnvironment 配置元素上的 minFreeMemoryPercentageToActivateService 的值。

解决方案

关闭其他不用的程序,释放内存。或者更改配置文件中

system.serviceModel–>

serviceHostingEnvironment–>

minFreeMemoryPercentageToActivateService=1属性值为小一些,或者为0。

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>

    </behaviors>
    <serviceHo1tingEnvironment multipleSiteBindingsEnabled="true" <span style="color:#ff0000;">minFreeMemoryPercentageToActivateService=0</span>/>
    <bindings>
      <basicHttpBinding>

或者重启服务:

文档:

https://yq.aliyun.com/articles/10188

https://msdn.microsoft.com/magazine/hh394143.aspx

原文地址:https://www.cnblogs.com/xmai/p/7488878.html