2013-03-19 18 views
28

Bu hatayı eninde sonunda nasıl çözebilirim? '/ **** StatWCF_OData' UygulamasındaIIS Sunucusu hatası geçerli toplam bellek nedeniyle


Sunucu Hatası.

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. 

Kaynak hatası:

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. 

Yığın İzleme:

[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 

Sürüm Bilgileri: Microsoft .NET Framework Sürüm: 4.0.30319; ASP.NET Versiyon: 4.0.30319.17929

cevap

82

Mesajınıza yazı yazılmıştır.

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

kolay yolu sadece daha fazla hakkında serviceHostingEnvironmenthere oku web.config

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

içine bu ekleyin.

@Mr Grok nasıl doğru bir şekilde işaret ettiyse, makinenizin yeterli fiziksel belleğe sahip olmadığının bir göstergesidir ve bunun neden olduğunu anlamanız gerekir. Bu ciddi bir sorun olabilir.

+10

En kolayı bu olsa da, sunucunuz kaynaklıdır, bu hata, makinede yeterince fiziksel bellek bulunmadığının bir göstergesi olabilir. ellerinin üzerinde. Ne kadar bellek kullanımda olduğunu görmek için kaynak monitörü/görev yöneticisini kontrol etmeye değer. –

+2

Neden% 0 yerine% 2 yerine merak etmiyorsunuz? % 0 ile, başarısız bir tahsis (muhtemelen işlenmemiş) tehlikesine karşı sunucudaki her işlemi (muhtemelen kritik) koymuyor mu? Oh "boş hafıza" sanal içermiyor (commit = 8/13 ile serbest = 0 gösteren görev yöneticisine bakarak)? Herkes onaylayabilir mi? – crokusek

5

Bu problemi yaşadım. Kapanıyor SQL server mevcut 32 gb 29 gb üzerinde kullanıyordu.

Eğer varsa, SQL Server'ınızı kontrol edin. MS SQL Sever, izin verdiğiniz kadar boş alan kaplayacak şekilde tasarlanmıştır. Bunu, SQL Server'ın özellik sekmelerinde maksimum sunucu bellek kutusunda sınırlayabilirsiniz.

0

serviceHostingEnvironment özniteliğini web.config dosyasında 0 olarak ekledim.

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

Bunu yapmanın en kolay yoludur.

İlgili konular