zoukankan      html  css  js  c++  java
  • WebHost failed to process a request.Memory gates checking failed because the free memory (140656640 bytes) is less than 5% of total memory

    WebHost failed to process a request.
     Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/49648990
     Exception: System.ServiceModel.ServiceActivationException: The service '/WCF/SynCacheService.svc' cannot be activated due to an exception during compilation.  The exception message is: Memory gates checking failed because the free memory (140656640 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 (140656640 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: 7636
    

      今天项目突然出错,提示以上信息,这是在使用WCF时出现的错误,如果大家有同样的错误,对号入座。大概意思是:内存入口检查失败,因为空闲内存低于5%。

      解决方案,在WCF对应的Web.config上添加一个节点,节点结构如下:

    <configuration>  
    <system.serviceModel>
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0"/> ......//忽略掉 </system.serviceModel>
    </configuration>

      主要是加上以下这句:在system.serviceModel节点下

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0"/>
  • 相关阅读:
    关于 Lazy<T>
    silverlight 模仿淘宝预览图片
    自动安装silverlight,类似flash自动安装
    来说说mask吧
    笔试题n! 末尾0的个数
    VueCLI和脚手架(原创)
    REST构架风格介绍之一:状态表述转移(ZZ)
    VSS2005的配置(转载)
    ArcGIS9.2安装与.NET简单使用(zz 简单且有用)
    ASP.NET内置对象(7个)
  • 原文地址:https://www.cnblogs.com/LJP-JumpAndFly/p/6422922.html
Copyright © 2011-2022 走看看