c# - The request channel timed out while waiting for a reply -
i have small application uses wcf communicate webserver. program used 200 clients, , each client sending in 5-20 requests/min.
looking @ error logs get:
the request channel timed out while waiting reply after 00:00:59.9989999
the requests made follows:
clientservice client = new clientservice(); client.open(); client.updateonline(userid); client.close(); this app.config
<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 service" binding="wshttpbinding" bindingconfiguration="wshttpbinding_iclientservice" contract="iclientservice" name="wshttpbinding_iclientservice"> <identity> <dns value="localhost" /> </identity> </endpoint> </client> </system.servicemodel> of "many calls" each day 200-800 fail. , n-1 ok. confused issue can be. looking @ server stats, it's hardly building sweat - each request takes <2 sec process. data it's sending consists of "int" or "very small strings" - so, not due size, if - there should consistent failure..
suggestions?
it seems requests queuing on server before being handled , starts time out. can try couple of things here see whats going on
1) try throttling in wcf services e.g: try increasing concurrent sessions. take wcf throttling
2) try using percall rather using sessions here make sure no session remains there. here can on interface remove session
[servicecontract(namespace="your namespace", sessionmode=sessionmode.notallowed)] and contract classes implementing interface
servicebehavior(instancecontextmode = instancecontextmode.percall)] and .... should enable tracing see whats going on .
Comments
Post a Comment