473,715 Members | 4,902 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

try/catch on performance gather runs amuck..sometime s

I have a custom service running under win2k3 that grabs performance data
and stores it into a sql database. I've noticed on occasion when the
data gathering stops, using the sysinternals process explorer that the
open handles of the process rocket from the usual 120+ to around 3-4,000
and every few seconds the handles increase into oblivion unless I kill
the process.

Using my own xml logger, I've pinned the code that causes the run away
handles to this:

try
{
totalUCEMessage s=(int)Math.Rou nd(_perfmonT.Ne xtValue());
totalMessagesSc anned = (int)Math.Round (_perfmonT.Next Value());
}
catch(Exception exceptionError)
{
xmlLogger.AddWi ndowsEvent("Gen eral Exception " +
exceptionError. Message,_ON_STA RT_,
FwdTech.Utiliti es.Logging.XmlE ventLogger.Even tClass.Informat ion);
}

The performance values I'm attempting to read from are the microsoft
intelligent messaging filter for exchange.

Now, the system event log never gets the general exception message
posted to it so the hang-up is in the use of .NextValue(). Is there a
possible threadding issue I'm not aware of with performance gathering
use thats causing the runaway threads?

Thanks for any suggestions.
Nov 16 '05 #1
1 1283
Greg,

As far as I know, there is not. While I don't know of the issue, there
are actually two other pieces of code that are being run:

exceptionError. Message
FwdTech.Utiliti es.Logging.XmlE ventLogger.Even tClass.Informat ion

Are you sure either of these isn't the cause? Also, in the
AddWindowsEvent method, is there any code in there before it writes to the
event log which could be causing the handles to open?

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Greg Merideth" <be*****@forwar dtechnology.net > wrote in message
news:3a******** ************@co mcast.com...
I have a custom service running under win2k3 that grabs performance data
and stores it into a sql database. I've noticed on occasion when the data
gathering stops, using the sysinternals process explorer that the open
handles of the process rocket from the usual 120+ to around 3-4,000 and
every few seconds the handles increase into oblivion unless I kill the
process.

Using my own xml logger, I've pinned the code that causes the run away
handles to this:

try
{
totalUCEMessage s=(int)Math.Rou nd(_perfmonT.Ne xtValue());
totalMessagesSc anned = (int)Math.Round (_perfmonT.Next Value());
}
catch(Exception exceptionError)
{
xmlLogger.AddWi ndowsEvent("Gen eral Exception " +
exceptionError. Message,_ON_STA RT_,
FwdTech.Utiliti es.Logging.XmlE ventLogger.Even tClass.Informat ion);
}

The performance values I'm attempting to read from are the microsoft
intelligent messaging filter for exchange.

Now, the system event log never gets the general exception message posted
to it so the hang-up is in the use of .NextValue(). Is there a possible
threadding issue I'm not aware of with performance gathering use thats
causing the runaway threads?

Thanks for any suggestions.

Nov 16 '05 #2

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

Similar topics

5
471
by: John Bailo | last post by:
I wrote a webservice to output a report file. The fields of the report are formatted based on information in an in-memory XmlDocument. As each row of a SqlDataReader are looped through, a lookup is done, and format information retrieved. The performance was extremely poor -- producing about 1000 rows per minute. However, when I used tracing/logging, my results were inconclusive. First of all, based on the size of the data and the...
11
3489
by: Pohihihi | last post by:
I was wondering what is the ill effect of using try catch in the code, both nested and simple big one. e.g. try { \\ whole app code goes here } catch (Exception ee) {}
11
6484
by: A Traveler | last post by:
I was just curious if anyone knows how the combinations of And/AndAlso and Or/OrElse compare in terms of performance. Which takes more work for the system, performing two evaluations on an And or performing short-circuiting on an AndAlso? Purely for enlightenment. Thanks in advance. - Arthur Dent.
37
3799
by: jortizclaver | last post by:
Hi, I'm about to develop a new framework for my corporative applications and my first decision point is what kind of strings to use: std::string or classical C char*. Performance in my system is quite importante - it's not a realtime system, but almost - and I concern about std::string performance in terms of speed. No doubt to use std implementation is a lot easier but I can't sacrifice speed.
4
1911
by: tshad | last post by:
Normally, I surround my Dataset/fill or DBreader execut with a try/Catch. Something like: ****************************************************** Dim dbReader As SqlDataReader Dim ConnectionString as String =System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Connection") Dim objConn as New SqlConnection (ConnectionString) Dim CommandText as String = "Select City,StateCode from zipCodes where
9
5759
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just call it Express for simplicity). I have, to try to simplify things, put the exact same DB on two systems, one running MSDE and one running Express. Both have 2 Ghz processors (one Intel, one AMD), both have a decent amount of RAM (Intel system...
5
4698
by: Nick Keighley | last post by:
Hi, I know in principal this is unanswerable as it is be implementation dependent.I have a code base that is heavily littered with try/catch clauses (the CASE tool has been set up to put a try/catch round every member function). Now I know this is BAD but I just wondered how bad. Will it kill
9
3335
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I have a class with an collection property. The collection property is sometimes equal to nothing. The class has a function named 'Exists' which returns TRUE if the specified string exists in the collection, and FALSE if it does not. This is illustrated below. My co-worker and I are having a friendly disagreement as to whether or not we should rely on an exception to return a result. My coworker's version of the function and...
0
12976
by: Vinod Sadanandan | last post by:
Table Partition Performance analysis ============================================ Collection of Statistics for Cost-Based Optimization/DBMS_STATS vs. ANALYZE The cost-based approach relies on statistics and if the cost-based Approach is used , then statistics should be gernerated for all tables, clusters, and all types of indexes accessed by SQL statements. If the size and data distribution of your tables change frequently, then...
0
8821
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
8718
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
9340
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
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6646
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
5967
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
4477
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
4738
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2539
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.