WCF를 사용하여 웹 서버와 통신하는 작은 응용 프로그램이 있습니다. 이 프로그램은 약 200 개의 클라이언트에서 사용되며 각 클라이언트는 약 5-20 요청/분을 전송합니다.응답을 기다리는 동안 요청 채널 시간이 초과되었습니다.
오류 로그를 보면 나는 종종 얻을 : 00 : 다음과 같이 59.9989999
요청이 만들어집니다 : 00 후 응답을 기다리는 동안
요청 채널이 초과
을ClientService Client = new ClientService(); Client.Open(); Client.updateOnline(userID); Client.Close();
이 은의 app.config
입니다 0<configuration> <configSections> </configSections> <startup><supportedRuntime version="v2.0.50727"/></startup><system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IClientService" 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="None"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="PATH TO SERVICE" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IClientService" contract="IClientService" name="WSHttpBinding_IClientService"> <identity> <dns value="localhost" /> </identity> </endpoint> </client> </system.serviceModel>
"많은 전화"중 매일 약 200-800이 실패합니다. 그리고 n-1에 대해서는 괜찮습니다. 나는 그 문제가 무엇이 될 수 있는지 매우 혼란 스럽다. 서버 통계를 살펴보면 땀을 흘리지는 않습니다. 각 요청은 처리 할 때까지 2 초에 < 걸립니다. 전송하는 데이터는 "int"또는 "매우 작은 문자열"로 구성됩니다. 따라서 크기 때문이 아니라면 일관된 오류가 발생해야합니다.
제안 사항?
하면 IIS에서이 서비스를 호스팅하거나 Windows 서비스 또는 다른 응용 프로그램에 의해 호스팅? –
설정 파일에서 제한 시간 및 견적 설정으로 놀아 보았습니까? – eulerfx
실제로 WCF 추적을 설정하고 (http://msdn.microsoft.com/en-us/library/ms733025.aspx에서 설명 함) 이러한 오류가 표시 될 때 기록되는 메시지를 검토하는 것이 좋습니다. –