Re: Web service testing
- From: "Jonny Bergdahl" <jonny.bergdahl@xxxxxxxxxxxxxxxx>
- Date: Mon, 15 Dec 2008 19:41:21 +0100
Actually, the problem was found to be on the server side. To test if my code was faulty or not, I back-ported the web service to a standard 2.0 web service using Visual Studio 2005. My code works as expected in that version, and easily handles 1000+ clients, while the WCF version cant even handle 10+ clients. This lead me to suspect that there is something wrong with the service invocation, and then I discovered that all requests to the service was handled by the same thread.
In the service.svc.cs file I use the ServiceBehaviour attribute, and have tried out different settings on the parameters, but nothing I have tried seems to have any effect:
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerCall, UseSynchronizationContext=false)]
Is there some other attribute I need to set, for example in the service or data contracts?
The service is run under IIS on a Windows 2003 server, so there are no server side connection limits that can explain this.
This is the relevant portion of the web.config file:
<system.serviceModel>
<services>
<service ...>
<endpoint address="" binding="basicHttpBinding" ....>
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name=....>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Regards;
/jb
""Steven Cheng"" <stcheng@xxxxxxxxxxxxxxxxxxxx> skrev i meddelandet news:dsjRf$AXJHA.5896@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Jonny,
From your description, you're using Async webservice invoke to load test an
ASP.NET webservice application. However, you found that the client will
unable to send method request after a certain period of time(numbers of
calls), correct?
Based on my experience, for such webservice client-side no-responding/hang
issue, "the maxconnection setting" does be a common issue since by default
each single process is allowed two connections to a single remote server.
However, since you've already adjusted that setting, I think there might
exist some other problems that result to the behavior.
One thing I can get so far is the client-side async processing thread.
Generally most async operation in .NET framework use thread-pool thread,
I'm wondering whether the thread-pool thread is expended out. For testing,
you can try manually create thread to execute webservice call instead of
using async method pattern to see whether it will come to the same result.
In addition, I'm wondering whether it is webservice method specfic, you can
try simplfy your webservice method to further narrow down the issue.
In addition, since the problems occur at client, you can use Visual studio
to attach the application process to see whether there occur some
exceptions(first chance) during the load testing.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
--------------------
From: "Jonny Bergdahl" <jonny.bergdahl@xxxxxxxxxxxxxxxx>
Subject: Web service testing
Date: Thu, 11 Dec 2008 21:18:50 +0100
I have run into a problem while load testing a webservice. I have written
an
test application that uses the async client pattern to call my web service
in a for loop. The web service typically don't respond in 30 seconds.
Problem is that after a couple of iterations (<10), the client calls never
reaches the server. I have used Microsoft Network Monitor to check, and
there is indeed no traffic sent to the server at all after this happens.
This leads me to assume that I have run into the "max connections" wall.
I have already tried to solve the problem by inserting the following into
the application config (and machine.config as well):
<system.net>
<connectionManagement>
<add address="*" maxconnection="2000" />
</connectionManagement>
</system.net>
I have also edited the registry (not sure if that should help, but IE sure
is much faster now):
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\MaxConnectionsPerServer
I am running Windows Vista Ultimate, and the test client is written as a
Windows Forms application using Visual Studio 2008 (.NET 3.5).
Any help is appreciated.
Regards;
/jb
.
- Follow-Ups:
- Re: Web service testing
- From: "Steven Cheng"
- Re: Web service testing
- References:
- Web service testing
- From: Jonny Bergdahl
- RE: Web service testing
- From: "Steven Cheng"
- Web service testing
- Prev by Date: RE: WCF SSL Cert
- Next by Date: Re: "Application start/stop" events in a WCF service
- Previous by thread: RE: Web service testing
- Next by thread: Re: Web service testing
- Index(es):
Relevant Pages
|
Loading