On May 11, 5:28 am, "Allan Ebdrup" <ebd...@noemail.noemailwrote:
I have a webservice written in dotNet1.1 that does some stuff and calls a
webservice written in dotNet 2.0.
I'm using a Visual Studio 2005 webtest and loadtest to test webservice.
When I load test the 1.1 webservice with for example 25 simultaneous users
with no wait time between requests, something wierd happens.
After between 3 and 10 minutes of the test the 1.1 webservice stops
responding, when I stop the loadtest and look at the Process that is the
application pool of the 1.1 webservice, it is constantly using 20-30 % CPU
and continues to do so, even when I stop the loadtest.
The only way to get the 1.1 webservice to respond again is to kill it's
process.
What's even stranger is that if I comment out the calls to the dotNet 2.0
webservice the loadtest runs fine for 30 minutes.
And the really strange part is that if I loadtest the dotNet 2.0 webservice
it responds fine for the 30 minute loadtest.
(Well actually it responds fine after 1-2 minutes, If I run 25 simultaneous
users it gives 25 responses and then gives no responses for 1-2 minutes and
then gives responses evenly for the rest of the 30 minute loadtest. If i run
the webtest, that the loadtest runs, in the 1-2 minute gap where no reponses
are recieved in the loadtest. the webtest runs fine and gives responses in
1-2 seconds (is this a bug in Visual Studion 2005?)
What's going on, and how can I see what's causing the 1.1 webservice to run
at 20-30 % CPU and stop responding?
Any help will be greatly appreciated.
Kind Regards,
Allan Ebdrup
Hi,
As your WS 1.1 is making outgoing calls to WS 2.0 make sure the worker
thread settings in machine.config is set using the following formula:
--------------------------------------------------------------------------------------------------------------------------
* maxconnection = 24 (threads used to make remote web service
calls)
* minFreeThreads = 176 (threads kept reserved for serving non-
request calls)
* minLocalRequestFreeThreads = 152
* maxWorkerThreads = 100 (Maximum number of worker threads per CPU
in the thread pool)
* maxIoThreads = 100 (Maximum number of IO threads per CPU in the
thread pool)
No of threads for processing incoming requests : (#CPU *
maxWorkerThreads) - (#CPU * minFreeThreads)
--------------------------------------------------------------------------------------------------------------------------
There's a good article on MSDN which is a must read
http://msdn.microsoft.com/library/de...netchapt17.asp
The most important setting in your case is the "maxconnection"; by
default this value is set to "2". This means only two threads will be
used to make outgoing calls from the ASP.NET app even if you are
loading 25 users. Change the machine.config on both WS 1.1 and WS 2.0
using the above formula and retest your app.
Also to see exactly what is happening on both these servers you need
to use "PerfMon". Add the following counters and watch them while you
do the perf testing. These counters will tell you exactly why the two
systems are behaving this way. The article listed above describes more
counters and you can add them as needed.
--------------------------------------------------------------
ASP .NET v1.1.4322\Request Current
ASP .NET v1.1.4322\Request Queued
ASP .NET v1.1.4322\Request Rejected
..NET CLR Memory\% Time in GC
--------------------------------------------------------------
As I don't have specifics on what your web services are doing I can
only assume based on the symptoms you described...
Regarding Symptom 1 where the WS 1.1 CPU utilization continues to be
at 20%-30% even after the test is stopped; this could be your code
specific. Check if the CPU utilization is being contributed by GC
(using the above perf counters). I had encountered a similar situation
where the web server after receiving the XML from a web service was
applying an XSLT and this XSLT had a bug which caused infinite loop,
causing the CPU usage to go high. Because of the infinite loop many
objects were getting created and GC was collecting them. So check your
code to see what could be contributing to the high CPU.
Regarding Symptom 2 where WS 2.0 doesn't respond for 1-2 minutes and
then starts responding fine; this could be because of the requests
getting Qed up. The perf counters will again help you in identifying
the issue.
Hope this points you in the right direction.
-Mahesh