473,888 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#: resource leaks using System.Messagin g (MSMQ) from an ASP.NET application

1 New Member
We are seeing some kind of resource leak in our performance lab running an ASP.NET (2.0) application that sends and receives messages from 2 public MSMQ queues. Here's a brief summary of what are application does:

1. user provides input on a form on an aspx page and clicks continues
2. on postback, the page creates a c# .net object and calls a method on it to process the data provided by the user
3. the object in turns creates an MessageQueue object and uses it to send a message to an MSMQ queue. It then creates another MessageQueue object to receive a response message from a different queue. our object does not use events or callbacks. It calls ReceiveByCorrel ationId to get its message back.
4. our code calls close and dispose on all queues and messages as soon as they are not needed anymore.
5. because of legacy code and need for backwards compatibility, we use the activeX formatter for the outgoing and incoming MSMQ message.

about our setup:
* our app runs on a win2k advanced server.
* the queues are on a separate server also running win2k
* the DC is yet on another server also running win2k
* all servers are on the same LAN and run MSMQ 2.0

When we run our application in our performance lab using a stress test tool, we are seeing the following behavior:
1. everything runs fine and fast until about 30 to 40 minutes into the test (9 minutes into the test, all test users are fully in the test executing all steps of the test script ). Then we see a huge slow down in response times and after a while aspnet_exe restarts. from that point on, the app never truly recovers and runs slow.
2. we have run TMQ STATE at various times during the test and see a constant increase in the number of handles and threads during the test. For example, TMQ state reports that at 15 minutes into the test, the number of threads is 49 and the number of handles is 383. At 41 minutes into the test the number of threads is 68 and the number of handles is 560.
3. we run only 40 test users during the test so at most there are only 40 concurrent calls happening to MSMQ.
4. The Pool Paged Bytes memory perf counter is creeping up during the test but only from 40 MB to 45 MB or so.
5. There are no MSMQ errors in the event log
6. after the problem occurs, our app logs a number of MSMQ timeout errors indicating that it did not get a response message within a given amount of time (set at 100 seconds for this test)
7. if we run a similar script that does not make calls to MSMQ, we do not see this problem.
8. we turned MSMQ logging on and see many errors/events being recorded in the log during the test

These numbers seems to indicate to me that we are (1) leaking some resource related to MSMQ and (2) that we hit a threshold for this resource 30 to 35 minutes into the test.

We have captured a bunch of other counters and data that we can share if this would help. Note that we have read all MSDN and forum posts related to MSMQ and resources, but none are helping (our messages our way less than 4 MB in size, we don't use callbacks, we don't get a "insufficie nt resources" error, etc.)

Does anyone have experienced similar issue? Also, does anyone know how to interpret TMQ State data (what are the "number of threads" and "number of handles" data for example) and MSMQ logs?

any help would be greatly appreciated.

~
Nov 26 '07 #1
1 4788
kenobewan
4,871 Recognized Expert Specialist
Here is an article that may help:
MSMQ from the plumber's mate
Nov 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1874
by: Steve Binney | last post by:
My code makes synchronous HttpWebRequest and HttpRebResponse calls. In VS 2003, I am getting memory leaks and event handle leaks. I am closing all streams and using "using"statements. I have used .Net memory profiler from Sci Tech to analyze the leaks and they are coming from inside HttpWebRequest and HttpRebResponse. When I run my code on VS2005, I do not get any leaks. Is this problem fixed in .Net 1.1 SP1? I may not be able to wait...
10
2354
by: Niall | last post by:
I'm not quite sure which groups to post this to, so short of a massive crosspost, I decided on these two. I am running into troubles with resource usage of our app on Win2k and above systems. In several places, I have seen it said that the WinNT model only limits resources to available memory. However, I have seen errors caused by running out of resources on a machine with over 1GB of free memory (running Win2k server), as well as on my...
3
2089
by: S.Creek | last post by:
Hi, I am trying to build a multi clients application with C# that will send and receive messages using a listener on a server, the computers are all on the same LAN, the listener need to identify a message in the MS Queues he listens on, and send it to the relevant clients (not all need to get all messages) it can send the message through an event or an interface.?
1
2128
by: John A Grandy | last post by:
in .NET 2.0 where is the type Message located ? in .NET 1.1 it was System.Messaging.Message
14
15886
by: Webbee | last post by:
I have a service built that is trying to read messages from a private que. When this tries to happen I get this error.... A workgroup installation computer does not support the operation From what I read I need to have my system setup on a domain, is this correct? For my dev work I'm not going to have that envirorment available and everything is tested on one laptop. Is there anything I can do? Thank you
1
2030
by: Anthony J. Biondo Jr. | last post by:
Hi Everyone: I was wondering if it is common practice to use some sort of messaging (MSMQ, WebSphere MQ) with web services. I understand the need for messaging for insert / update transactions, but do you think using messaging for inquiry transactions is overkill? thanks, Anthony
5
2786
by: Daniel | last post by:
Hey guys When you hook an event (c# 2.0 syntax): myEvent += MyMethodToFire; You need to also unsubscribe it to avoid a resource leak so that the object it is in gets garbage collected like so : myEvent -= MyMethodToFire; That's all fine, but when you use visual studio to create events for objects it never creates an unsubscribing reference, so is it puting in resource leaks? Or is this being cleared somewhere that i am not seeing?
0
1694
by: dom_perron | last post by:
Hi, I have a problem when I try to start an application using MSMQ from a Windows Service. The application runs on a server. The client send a message to a public queue created on the server, the server process the request and return the result to a public queue on the client. All is working fine if I start my application directly on the server. But we want to embed the start of the application into a Windows service. When I install...
0
2125
by: ASPnewb1 | last post by:
Hello, I have a question about MSMQ as I'm new to using this system in the .NET framework. Here is my following application that I run 2 instances of to test the ability to communicate through the MSMQ. It's just a basic form with 2 textboxes, and 2 buttons, first textbox is to "send" or put on the queue (with a send button), second is to receive (take from the queue with a receive button). My question is, why before I specified...
0
9961
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
9800
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
11178
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
10777
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
10882
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,...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5817
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
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.