2013-03-19 72 views
28

このエラーを最終的に解決するにはどうすればよいですか?現在の合計メモリのためにIISサーバーエラーが発生しました


'/ **** 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. 

ソースエラー:

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. 

スタックトレース:

[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 

バージョン情報:Microsoft .NET Frameworkのバージョン:4.0.30319; ASP.NETバージョン:4.0.30319.17929

答えて

82

ソリューションはあなたのポストに書かれています。

To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

ちょうどserviceHostingEnvironmenthereについてもっと読む

<system.serviceModel> 
    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" /> 
</system.serviceModel> 

あなたのweb.configファイルにこれを追加する最も簡単な方法。

とにかく、Grok氏は、マシンが十分な物理メモリを持っていないということを正しく指摘しています。なぜこれが起こったのかを理解する必要があります。深刻な問題になる可能性があります。

+10

これは最も簡単なことですが、サーバーのリソースが不足している場合、このエラーはマシンに十分な物理メモリがないことを示している可能性があります。あなたの手にどのくらいのメモリが使用されているかを確認するには、リソースモニタ/タスクマネージャをチェックする価値があります。 –

+2

なぜ0%ではなく2%でないのだろうか? 0%を指定すると、すべてのプロセス(おそらくクリティカル)が、失敗したalloc(おそらく未処理)の危険でサーバに置かれませんか?ああ、「空きメモリ」には仮想(タスクマネージャの空きが0 =コミット= 8/13の場合)が含まれていませんか?誰でも確認できますか? – crokusek

5

この問題がありました。 SQLサーバは32GB以上の32GBを使用していました。

SQL Serverがあるかどうか確認してください。 MS SQL Severは、許可しただけの空き領域を占有するように設計されています。これは、SQL Serverのプロパティタブの最大サーバーメモリボックスで制限できます。

0

web.configのserviceHostingEnvironment属性を0に追加しました。

<system.serviceModel> 
    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" /> 
</system.serviceModel> 

これは私がこれを実行した際に見つけたsipmplest方法です。

関連する問題