如何最终解决这个错误?
'/****StatWCF_OData'应用程序中的服务器错误.
Memory gates checking failed because the free memory (373817344 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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InsufficientMemoryException: Memory gates checking failed because the free memory (373817344 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.
Run Code Online (Sandbox Code Playgroud)
来源错误:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪:
[InsufficientMemoryException: Memory gates checking failed because the free memory (373817344 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.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes) +121924
System.ServiceModel.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity) +86
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +883
[ServiceActivationException: The service '/****StatWCF_OData/OData.svc' cannot be activated due to an exception during compilation. The exception message is: Memory gates checking failed because the free memory (373817344 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.Runtime.AsyncResult.End(IAsyncResult result) +650220
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +210733
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282
Run Code Online (Sandbox Code Playgroud)
版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.17929
Mil*_*jka 99
解决方案写在您的帖子中.
要解决此问题,请减少计算机上的负载或调整serviceHostingEnvironment配置元素上的minFreeMemoryPercentageToActivateService的值.
最简单的方法就是将其添加到web.config中
<system.serviceModel>
<serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" />
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)
了解更多关于serviceHostingEnvironment 这里.
无论如何@Mr Grok正确地指出它表明你的机器没有足够的物理内存,你应该弄清楚为什么会发生这种情况.这可能是一个严重的问题.
小智 5
我有这个问题.事实证明,SQL服务器使用的是超过29 gb的32 gb.
检查您的SQL Server(如果有).MS SQL Sever旨在占用尽可能多的可用空间.您可以在SQL Server的属性选项卡中的最大服务器内存框中对此进行限制.
| 归档时间: |
|
| 查看次数: |
86904 次 |
| 最近记录: |