c# - WCF web service is too busy -
i have problem busy wcf service through clients can connect , consume it. below error , stack trace on server configuration , attributes of class.
error message , stacktrace:
the http service located @ https://my.web.service.com/service/service.svc unavailable. because service busy or because no endpoint found listening @ specified address. please ensure address correct , try accessing service again later.exst: server stack trace: @ system.servicemodel.channels.httpchannelutilities.processgetresponsewebexception(webexception webexception, httpwebrequest request, httpabortreason abortreason) @ system.servicemodel.channels.httpchannelfactory`1.httprequestchannel.httpchannelrequest.waitforreply(timespan timeout) @ system.servicemodel.channels.requestchannel.request(message message, timespan timeout) @ system.servicemodel.channels.securitychannelfactory`1.securityrequestchannel.request(message message, timespan timeout) @ system.servicemodel.security.securitysessionsecuritytokenprovider.dooperation(securitysessionoperation operation, endpointaddress target, uri via, securitytoken currenttoken, timespan timeout) @ system.servicemodel.security.securitysessionsecuritytokenprovider.gettokencore(timespan timeout) @ system.identitymodel.selectors.securitytokenprovider.gettoken(timespan timeout) @ system.servicemodel.security.securitysessionclientsettings`1.clientsecuritysessionchannel.onopen(timespan timeout) @ system.servicemodel.channels.communicationobject.open(timespan timeout) @ system.servicemodel.channels.servicechannel.onopen(timespan timeout) @ system.servicemodel.channels.communicationobject.open(timespan timeout) @ system.servicemodel.channels.servicechannel.callopenonce.system.servicemodel.channels.servicechannel.icallonce.call(servicechannel channel, timespan timeout) @ system.servicemodel.channels.servicechannel.calloncemanager.callonce(timespan timeout, calloncemanager cascade) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, timespan timeout) @ system.servicemodel.channels.servicechannelproxy.invokeservice(imethodcallmessage methodcall, proxyoperationruntime operation) @ system.servicemodel.channels.servicechannelproxy.invoke(imessage message)
web server configuration:
<?xml version="1.0"?> <configuration> <configsections> <sectiongroup name="applicationsettings" type="system.configuration.applicationsettingsgroup, system, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"> <section name="server.properties.settings" type="system.configuration.clientsettingssection, system, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false"/> <section name="serveredi.properties.settings" type="system.configuration.clientsettingssection, system, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false"/> </sectiongroup> </configsections> <system.web> <httpruntime maxrequestlength="65536"/> <customerrors mode="off"/> <compilation targetframework="4.5"/> <pages controlrenderingcompatibilityversion="4.0"/> </system.web> <system.servicemodel> <bindings> <wshttpbinding> <binding name="iwebservice" closetimeout="01:00:00" opentimeout="01:00:00" receivetimeout="01:00:00" sendtimeout="01:00:00" allowcookies="false" bypassproxyonlocal="false" hostnamecomparisonmode="strongwildcard" maxbufferpoolsize="2147483647" maxreceivedmessagesize="2147483647" messageencoding="text" textencoding="utf-8" usedefaultwebproxy="true"> <readerquotas maxdepth="2147483647" maxstringcontentlength="2147483647" maxarraylength="2147483647" maxbytesperread="2147483647" maxnametablecharcount="2147483647"/> <security mode="transportwithmessagecredential"> <transport clientcredentialtype="none" proxycredentialtype="none" realm=""/> <message clientcredentialtype="username" negotiateservicecredential="true"/> </security> </binding> </wshttpbinding> </bindings> <services> <service behaviorconfiguration="nowa" name="serviceweb.webservice"> <endpoint address="" binding="wshttpbinding" bindingconfiguration="iwebservice" contract="serviceweb.iwebservice" /> </service> </services> <behaviors> <servicebehaviors> <behavior name="nowa"> <servicemetadata httpsgetenabled="true"/> <servicecredentials> <servicecertificate findvalue="xxxyyyzzz.com" storelocation="localmachine" x509findtype="findbysubjectname"/> <usernameauthentication usernamepasswordvalidationmode="custom" customusernamepasswordvalidatortype="serviceweb.mycustomusernamepasswordvalidator,serviceweb"/> <windowsauthentication includewindowsgroups="false" allowanonymouslogons="false"/> </servicecredentials> <serviceauthorization impersonatecallerforalloperations="false"/> <datacontractserializer maxitemsinobjectgraph="2147483647"/> <servicedebug includeexceptiondetailinfaults="true"/> <servicethrottling maxconcurrentcalls="500" maxconcurrentinstances="500" maxconcurrentsessions="500" /> </behavior> </servicebehaviors> </behaviors> <servicehostingenvironment multiplesitebindingsenabled="true"/> </system.servicemodel> <startup> <supportedruntime version="v4.0" sku=".netframework,version=v4.0"/> </startup> <system.webserver> <urlcompression dostaticcompression="false"/> </system.webserver> </configuration>
class attributes:
[servicebehavior(instancecontextmode = instancecontextmode.single)] //[servicebehavior(instancecontextmode = instancecontextmode.percall, concurrencymode = concurrencymode.single)] // [servicebehavior(instancecontextmode = instancecontextmode.percall, // concurrencymode = concurrencymode.multiple)] public class webservice : iwebservice {}
if grateful cases described on stackoverflow not fit , solve case. @ moment service using 50 customers. problem comes when call method returns , can not call asynchronously, because answer must delivered.
wcf has default throttling values, hitting these, see: http://blogs.msdn.com/b/wenlong/archive/2009/07/26/wcf-4-higher-default-throttling-settings-for-wcf-services.aspx
normally error when client not close connection, connections open until timeout, blocking new calls.
Comments
Post a Comment