BLサービスとしてWCFサービスがあります。サービスは混合トランスポートモードであり、BasicHttpBindingによってバインドされた10を超える異なるエンドポイントがあり、異なるコントラクトとそれらすべてに同じアドレスがあります。このサービスは、IIS-7のアプリケーションプールで実行されます。
問題は、サービスは正常に機能することですが、最初の呼び出しの後、WSDLを取得しても、w3wp.exeのメモリ使用量は300メガになり、サービスのメモリ使用量は絶えず増加し続け、すべての物理メモリを引き継ぎますサーバーの(98-100%)。メモリ不足の例外は発生しませんでしたが、この状況では他のアプリケーションとサービスの速度が低下するため、数日ごとにアプリケーションプールを手動で更新する必要があります。私はすでにメモリプロファイリングツールを使用しようとしましたが、問題の原因につながるものは見つかりませんでした。
誰かがこの問題に遭遇しましたか?もしそうなら、あなたは何をしましたか?
追加情報:
- BLサービスはNHibernateに基づくDALフレームワークの上にあり、メモリリークがそこから発生していることはすでに除外されています。
構成ファイル
<?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> </appSettings> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpRuntime maxRequestLength="20000" requestLengthDiskThreshold="20000" /> </system.web> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="DefaultServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="AnonymousBehavior"> </behavior> </endpointBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="SecureBinding" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="true" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536000" maxBufferPoolSize="524288000" maxReceivedMessageSize="65536000" transferMode="Buffered"> <readerQuotas maxDepth="20000000" maxStringContentLength="8192000" maxArrayLength="16384000" maxBytesPerRead="4096000" maxNameTableCharCount="16384000" /> <security mode="None"> <transport clientCredentialType="None"/> </security> </binding> </basicHttpBinding> </bindings> <services> <service name="BL.Services.MyService" behaviorConfiguration="DefaultServiceBehavior"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Security/Anonymous" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.IAnonymousClaimsService" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Domain/App" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.IAppService" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Domain/App" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.IAttachmentService" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Domain/Site" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.ISecurityService" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Domain/Transaction" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.ITransactionService" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Domain/ActiveDirectory" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.IActiveDirectoryService" /> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecureBinding" bindingNamespace="Domain/Report" behaviorConfiguration="WithSecurityContextInspector" contract="BL.Services.Contracts.IReportService" /> <host> <baseAddresses> <add baseAddress="//MyService.svc" /> </baseAddresses> </host> </service> </services> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <defaultDocument> <files> <add value="MyService.svc" /> </files> </defaultDocument> </system.webServer> </configuration>