0
나는 WCF에 다소 익숙하다. 그리고 기록을 얻기위한 호출은 거의 20 초가 걸렸다. 심지어 디버깅 중 로컬 호출에도 시간이 걸린다. 그것은 정확하게 완료하지만 너무 느립니다.WCF 통화가 20 초 걸리는 것
클라이언트 전화 :
var docImgSvc = new DocImagingService.DocImagingStatusServiceClient("WSHttpBinding_IDocImagingStatusService");
CurrentManifest = docImgSvc.GetManifest(manifestLookup); //<<---This takes 20 secs
if (CurrentManifest == null || CurrentManifest.ManifestId == 0)
서버 루틴 :
public Manifest GetManifest(int manifestNumber)
{
var de = new DocumentImagingEntities(); //<<---Takes 20 secs before it gets here.
var manifest = de.Manifests.FirstOrDefault(m => m.ManifestId == manifestNumber);
return manifest;
}
서버 설정 :
<system.serviceModel>
<services>
<service name="DocImagingServices.DocImagingStatusService">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Design_Time_Addresses/DocImagingServices/DocImagingStatusService/"/>
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" contract="DocImagingServices.IDocImagingStatusService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
클라이언트 구성 :
내가 인해 응용 프로그램 풀 설정이되었습니다 응답 시간의 유형을 보았다 이전<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IDocImagingStatusService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8732/Design_Time_Addresses/DocImagingServices/DocImagingStatusService/"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDocImagingStatusService"
contract="DocImagingService.IDocImagingStatusService" name="WSHttpBinding_IDocImagingStatusService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
이와 비슷한가요? http://stackoverflow.com/questions/10859832/why-is-the-first-wcf-client-call-slow – lhan
@ lhan16, 문제의 링크에서 첫 번째 히트에는 700 밀리 초가 걸렸습니다. 여기에 20 초 걸린다. –