multi-threaded C# app started by service uses lots of memory ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi ALl

I've got a strange issue (on development, not production)

With .NET 1.1, I've got a multithreaded app that sends and received to MSMQ, also has uses a Remoting server so as to run mirrored with other apps of the same kind

The app is usually started by a service ( i.e. using Process.Start() ) , the service acts as a monitor to make certain the app is running

The odd thing is that when the app gets started by the service, the apps memory consumption grows and keeps growing, up to the limits of the VM (300 Mb or so). I see this in task manager

When I start the app from the command line, then start the monitor (which detects the app), everything is fine, memory usage is about 10Mb

The machine is PIII with about 2 Gbs of RAM. Its a development machine, running W2K SP4 + all the latest service packs and critical patches

Fortunately this issue isn't seen on the production machine, which is also a W2K SP4 etc., with .NET 1.1

Does anybody have any ideas? If its machine related, that's odd since I just installed .NET 1.1 on both machines, as well as MSMQ
 
FYI to all

this is/was a problem with McAfee a/v software, not a .NET issu

a server crashed over the weekend with MCafee a/v auto-update.
Disabling mcafee a/v allows all the apps to run fine, without memory or CPU problems
 
Hi ALl
just in case someone else needs this

I was using a Pee
the Message needed to be explicitly Disposed and set to null, sorry about the tabbin
e.g.

System.Messaging.Message xPeeked = null
tr

xPeeked = m_MyQueue.Peek(new TimeSpan(0,0,1,5,0))
}
catch (MessageQueueException mqe

System.Windows.Forms.Application.DoEvents(); // in a tight loop

if (mqe.ToString().IndexOf("timeout") >= 0

xPeeked.Dispose()
xPeeked = null
continue
}
Log
"Exception"
"MSMQWorkerThread() Peek receive"
mqe)
xPeeked.Dispose()
xPeeked = null;
continue;
 
Back
Top