Monday, 15 April 2013

iis 7.5 - WCF more than 50 concurent long running request -



iis 7.5 - WCF more than 50 concurent long running request -

hy, have wcf test service, nil thread.sleep(10000) , phone call 200 clients. problem response time greater , greater, after 10 minutes on 40 sec... have tired alter web.config , machine.config too. have windows 2008 r2 , iis 7.5

in web.config

<servicethrottling maxconcurrentcalls="100" maxconcurrentsessions="400" maxconcurrentinstances="2000" />

in macine.config

<processmodel autoconfig="false" loglevel="none" maxiothreads="1000" maxworkerthreads="1000" miniothreads="100" minworkerthreads="100" />

in aspnet.config

<applicationpool maxconcurrentrequestspercpu="5000" maxconcurrentthreadspercpu="0" requestqueuelimit="5000" />

the wcf service:

public interface isampleservice { [operationcontractattribute] string samplemethod(string msg); } public class sampleservice : isampleservice { public string samplemethod(string msg) { thread.sleep(10000); homecoming msg; } }

here solution:

[servicecontract(namespace = "http://microsoft.wcf.documentation")] public interface isampleservice { [operationcontract] task<string> samplemethod(string msg); } public class sampleservice : isampleservice { async task<string> isampleservice.samplemethod(string msg) { var task = task.factory.startnew((param) => { homecoming "return server : " + msg; }, taskcontinuationoptions.longrunning); await task.delay(10000); homecoming await task.configureawait(false); } }

and need web.config changes:

<servicethrottling maxconcurrentcalls="500" maxconcurrentsessions="1000" maxconcurrentinstances="2000" />

wcf iis-7.5

No comments:

Post a Comment