473,797 Members | 3,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net 1.1 application pool locking

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
May 11 '07 #1
6 1912
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)
* minLocalRequest FreeThreads = 152
* maxWorkerThread s = 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 *
maxWorkerThread s) - (#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\Reque st Current
ASP .NET v1.1.4322\Reque st Queued
ASP .NET v1.1.4322\Reque st 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

May 11 '07 #2
Thanks for Mahesh's informative input.

Hi Allan,

I agree with Mahesh on troubleshooting the threading configuration as it is
the most likely problem here after read the problem description. For
ASP.NET web application, each worker process has a fixed number of worker
threads & IO threads (in a given managed thread pool). And there is certain
configuration setting which will affect the threading behavior. For
example, the maxFreeXXThread s determine how many concurent threads may
occur in your applicaiton worker process(ASP.NET requests are all processed
by thread pool threads). And since your ASP.NET web application will send
request(call webservice) to another local webservice, the "free Local
threads" setting is also very important. When any of these resource get
exhausted, the application will be blocked.

here are some ASP.NET threading related resource, you may have a look:

#Support WebCast: Microsoft ASP.NET Threading
http://support.microsoft.com/kb/820913
#How To: Monitor the ASP.NET Thread Pool Using Custom Counters
http://msdn2.microsoft.com/en-us/library/ms979194.aspx

#Threading Explained
http://msdn2.microsoft.com/en-us/lib...tchapt06_topic
8

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

May 14 '07 #3
Thanks for the answers.
I found that it wasn't calling the other webservice that was causing dotNet
1.1 to stop responding.
It was this code:
-------
System.Collecti ons.ArrayList sortedFilterIds = new
System.Collecti ons.ArrayList(f ilterIds);
sortedFilterIds .Sort();
using(System.Da ta.IDataReader dr = DSI.PositionPos ting.GetPosting Ids())
{
int intIdOrdinal = dr.GetOrdinal(" Id");
int intCount=0;
while(dr.Read() )
{
if(!dr.IsDBNull (intIdOrdinal))
{
if(sortedFilter Ids.BinarySearc h(dr.GetInt32(i ntIdOrdinal))>= 0)
{
intCount++;
}
}
}
return intCount;
}
------------
where filterIds is an int[] with up to somewhere between 0 and 1000 entries,
and DSI.PositionPos ting.GetPosting Ids returns a DataReader with ID's (up to
5000).
The code simply counts the size of the intersection of the filterId's and
the Id's returned by DSI.PositionPos ting.GetPosting Ids.

I can't see how this code could cause the dotNet 1.1 application pool to
lock up and use 20-30 % cpu.

The reason for not simply using a WHERE ID IN (...) with the filterIds in
the SQL was because SQL 2000 has VERY poor performance when the WHERE IN
(...) clause has very long lists of Id's, and there is even a very low limit
to how long the SQL Query can be.

In the meantime we have moved to SQL 2005 that doesn't have the problems
with long IN clauses in the SQL, that SQL 2000 had. So I changed the code to
use COUNT(*) WHERE ID IN (...), and everything runs fine.

Seems to be some bug in dotNet 1.1, perhaps when using BinarySearch?

Kind Regards,
Allan Ebdrup
May 14 '07 #4
Hi Allan,

Thanks for your reply.

So you've narrow the blocking issue to the ArrayList's BinarySearch
section? How did you find that it is that code fragment cause the page
request be blocked?

for BinarySearch, I haven't find any existing issue on it, not suring
whether it also related to the number collection used here. I think you can
move the code out in a normal console or a separate page (test the
intersection size counting code) to see whether it will show the same
problem.

BTW, since you're sorting and searching against integer list, why not use
the generic List<Tclass?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
May 15 '07 #5

"Steven Cheng[MSFT]" <st*****@online .microsoft.comw rote in message
news:sg******** ********@TK2MSF TNGHUB02.phx.gb l...
Hi Allan,

Thanks for your reply.

So you've narrow the blocking issue to the ArrayList's BinarySearch
section? How did you find that it is that code fragment cause the page
request be blocked?
No I've narrowed the problem down to the code I pasted.
When I commented out the code the problem dissapeared. When I put it back in
the problem reappeared.
I'm just guessing that it might be BinarySearch that is the problem..
for BinarySearch, I haven't find any existing issue on it, not suring
whether it also related to the number collection used here. I think you
can
move the code out in a normal console or a separate page (test the
intersection size counting code) to see whether it will show the same
problem.
I've solved the problem by calculating the intersection in th SQL query, I
will not be investigating further.
BTW, since you're sorting and searching against integer list, why not use
the generic List<Tclass?
As I write it is a dotNet 1.1 application. But you are right if it was a
dotNet 2.0 application a generic list would be the rigth choice.

Kind Regards,
Allan Ebdrup
May 21 '07 #6
Thanks for your followup Allan,

Glad to hear that you've found a means to workaround the issue. If you meet
any further problem on this and need help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

May 22 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2955
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am starting is that it has a welcome window first which gets displayed and then the real windows after a while,in other words it means that the process name is the same, but the handle I need to retrive is the one from the final window and not the...
8
2823
by: Gaensh | last post by:
HI, I have a singleton pattern to acess my database the following is the sample code use to implement singleton pattern public class DataAccessHelper { private static DataAccessHelper instance; /// <summary> /// public property that can only get the single instance of this class. /// </summary>
9
23087
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated to a pool. If I assign only one application to a applicaton pool and have multiple worker processes assigned to that pool. Will my application be processed by many worker processes?
4
4662
by: pjdouillard | last post by:
Hello all, Here is the context of my problem: We have an ASP.NET 1.1 application that has its own application pool setup and that runs under the identity of a NT Domain service account (this is for security reason when accessing databases). We use the Integrated Windows authentication to authenticate users, and we have setup the Web.config file to authenticate those users against 3 NT Domain Global Groups. Everything is working fine...
5
3960
by: J-T | last post by:
I guess I'm a litte bit confused about app pool and worker process. In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated to a pool. If I assign only one application to a applicaton pool then: 1) Can I have multiple worker processes assigned to that pool? If yes,what is the advantage of doing so?
2
5517
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have 2 web servers on which I am running a .net version 2 application, both of which I want to use an application pool with the same domain user's id and password to tighten security. I have this working fine on one web server (http), but keep getting the error below on the other (https). I cannot see any difference in how I have set up the application pool, and the messages below do not shed any light on the matter. Can you help me...
4
4531
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
5
4336
markrawlingson
by: markrawlingson | last post by:
Hey guys, Having a bit of a complicated issue here so please bare with me while I explain. I'm also not a system admin and don't know a whole lot about IIS, so i apologize in advance. I discovered this morning an inconsitency within the application pools of our website. Basically, we have a maze of cluttered folders and other gargabe within the website - with one main folder, called /secured/ running from the root of the website, which...
9
3229
by: Patrick Sona | last post by:
Hi all, Is it possible to force an ASP.NET web-application to exit? At application-startup I have to check and establish some database-connections. If there an error occours, the application must shutdown, so that at the next request the application_start section will be reentered. Has anyone a solution?
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.