WebHost failed to process a request.Memory gates checking failed because the free memory (140656640 bytes) is less than 5% of total memory
2017-02-21 10:39
399 查看
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"/>
相关文章推荐
- 【转】Memory gates checking failed because the free memory***解决办法
- Failed to execute request because the App-Domain could not be created
- asp.net2.0发布到本机IIs报错:Failed to execute request because the App-Domain could not be created. Error: 0
- Unable to process request: General SSLEngine problem.Unable to connect to neo4j at `localhost:7687`, because the certificate the server uses has changed.
- Failed to execute request because the App-Domain could not be created.
- Server Application Unavailable 【Failed to execute request because the App-Domain could not be created.】的解决办法
- 服务器端安装ASP.NET运行环境错误Failed to execute request because the App-Domain could not be created. Error: 0x80131902
- Failed to execute request because the App-Domain could not be created
- Web service request SetParameters to Report Server http://host/reportserver failed. Error: 请求因 HTTP 状态 401 失败: Unauthorized
- (转)HttpWebRequest以UTF-8编码写入内容时发生“Bytes to be written to the stream exceed the Content-Length bytes size specified.”错误
- Failed to execute request because the App-Domain could not be created. Error: 0x80131902 (方法2)
- Failed to execute request because the App-Domain could not be created. Error: 0x80131902
- IIS错误日志:Failed to execute request because the App-Domain
- Failed to execute request because the App-Domain 的解决方法
- 【转】Vmware ESX 3.0出现“error connecting: can not connect to host x.x.x.x: a connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed……的解决方法
- Web service request SetParameters to Report Server http://host/reportserver failed. Error: 请求因 HTTP 状态 401 失败: Unauthorized
- Failed to execute request because the App-Domain could not be created
- fix errors 1088: “Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied” and 1334: “Exception: System.IO.FileLoadException”
- Failed to execute request because the App-Domain could not be created. Error: 0x80070002 系统找不到指定的文件。
- Web service request SetParameters to Report Server http://host/reportserver failed. Error: 请求因 HTTP 状态 401 失败: Unauthorized