WebHost failed to process a request.Memory gates checking failed because the free memory (140656640 bytes) is less than 5% of total memory
2024-08-31 22:39:23
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"/>
最新文章
- 使用jOrgChart插件, 异步加载生成组织架构图
- java利用JDK调用并执行js源码
- JAVA生成随机数
- iOS多线程杂论
- unittest可能面临的问题以及解决方法
- RBL开发笔记一
- lisp分支
- plsql programming 17 过程, 函数与参数
- 连接mongo的服务提示:HTTP Status 500 - com.mongodb.MongoException$Network: can't call something
- demo virdata 虚拟数据
- pomelo环境搭建
- vs2010+ Ankhsvn使用详解
- Android学习站点推荐
- html代码实现自动滚动,鼠标滑过时停止滚动
- C语言中的位运算的技巧
- SqlServer Partition 分区表
- php封装生成随机数函数
- slf4j+log4j2模式的日志搭建
- git1使用步骤初始化拉取修改提交推送
- 廖雪峰Java9正则表达式-2正则表达式进阶-3分组匹配
热门文章
- WP8日历(含农历)APP
- Des 加密cbc模式 padding
- Perl——正则表达式(四) 查找替换s///
- 【Codeforces Round #443 (Div. 2) C】Short Program
- 老李的菜园 mysql 自定义函数
- Linear to physical address translation with support for page attributes
- OVS中对于用户层和datapath层的多个通道利用epoll进行控制
- x=min(x, y)
- memcached缓存分布式部署方案
- P2P系统哪家强,功能其实都一样