473,385 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

MQ memory leak

Hi,

I have implemented a Service that is responsible for getting messages from a
MS MQ located on a remote machine. I'm getting memory leak from time to time
(???). In some situation, it is easier to reproduce (e.g.: remote machine
not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter,
......)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
..NET 1.1

Thanks,
José
Nov 15 '05 #1
17 4749
Jose,

Are you calling Dispose on all of the classes that you are using? For
example, are you calling Dispose on the MessageQueue instance you are using?
This could be a major source of any leaks you might be seeing.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from a MS MQ located on a remote machine. I'm getting memory leak from time to time (???). In some situation, it is easier to reproduce (e.g.: remote machine
not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should say that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter,
.....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José

Nov 15 '05 #2
In fact, before entering my loop, I create an instance of a class that will
try to fetch messages. This class has a private member :
private MessageQueue m_mq;

Within the method called by the main loop, whenever I try to fetch a
message, I use m_mq.Receive(TimeToWait).
In case a message is retrieved, I pass it back to my main loop. In any other
situation, I return a null.

There is a situation where I call Dispose() method on my "m_mq" member. This
is when I get an error of type MessageQueueErrorCode.QueueNotAvailable. In
such a case, I apply the following algorithm:
m_mq.Dispose();
m_mq=null;
MessageQueue.ClearConnectionCache();
m_mq = new MessageQueue(m_strQueueName);
MessageQueue.EnableConnection = true;
When the main loop receive the answer (either a message or a null), it will
process the message and call the method again to get the next message.

In that sense, I think I did not forgot to call any Dispose().

José

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> a écrit
dans le message de news:et**************@TK2MSFTNGP10.phx.gbl...
Jose,

Are you calling Dispose on all of the classes that you are using? For
example, are you calling Dispose on the MessageQueue instance you are using? This could be a major source of any leaks you might be seeing.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time to

time
(???). In some situation, it is easier to reproduce (e.g.: remote

machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should

say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José


Nov 15 '05 #3
>
Are you calling Dispose on all of the classes that you are using? For
example, are you calling Dispose on the MessageQueue instance you are using? This could be a major source of any leaks you might be seeing.
Why should we call Dispose() manually? Shouldn't be calling Close() is
enough? I thought dispose will be called when the object is about to be
garbage collected and shouldn't be called manualy.

/m

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time to

time
(???). In some situation, it is easier to reproduce (e.g.: remote

machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should

say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José


Nov 15 '05 #4
Muscha,

They are doing the same thing. For some classes though, it fits better
to have a method named "Close" as opposed to "Dispose" when dealing with the
resource (for example, on a FileStream, if you Dispose it, it might indicate
you are getting rid of the file, as opposed to closing it).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Muscha" <mu****@no.spam.net> wrote in message
news:Ob*************@TK2MSFTNGP09.phx.gbl...

Are you calling Dispose on all of the classes that you are using? For
example, are you calling Dispose on the MessageQueue instance you are

using?
This could be a major source of any leaks you might be seeing.


Why should we call Dispose() manually? Shouldn't be calling Close() is
enough? I thought dispose will be called when the object is about to be
garbage collected and shouldn't be called manualy.

/m

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time

to time
(???). In some situation, it is easier to reproduce (e.g.: remote machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I
should say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,

MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José



Nov 15 '05 #5
Are you receiving from a remote computer ?
If yes, does the leak happen when remote is not available ?

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

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from a MS MQ located on a remote machine. I'm getting memory leak from time to time (???). In some situation, it is easier to reproduce (e.g.: remote machine
not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should say that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter,
.....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José

Nov 15 '05 #6
As far as I see it, it append "only" when the remote is not available

José
"Doron Juster [MSFT]" <Do****@Online.Microsoft.com> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
Are you receiving from a remote computer ?
If yes, does the leak happen when remote is not available ?

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

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time to

time
(???). In some situation, it is easier to reproduce (e.g.: remote

machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should

say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José


Nov 15 '05 #7
Thanks, I'll see if I can reproduce this.

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

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
As far as I see it, it append "only" when the remote is not available

José
"Doron Juster [MSFT]" <Do****@Online.Microsoft.com> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
Are you receiving from a remote computer ?
If yes, does the leak happen when remote is not available ?

Thanks, Doron
--
This posting is provided "AS IS" with no warranties, and confers no

rights.
.

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time
to time
(???). In some situation, it is easier to reproduce (e.g.: remote machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I
should say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,

MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José



Nov 15 '05 #8
Any news?

By the way, I have posted a detail about what I do just above in the same
thread.

José
"Doron Juster [MSFT]" <Do****@Online.Microsoft.com> wrote in message
news:uG**************@TK2MSFTNGP09.phx.gbl...
Thanks, I'll see if I can reproduce this.

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

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
As far as I see it, it append "only" when the remote is not available

José
"Doron Juster [MSFT]" <Do****@Online.Microsoft.com> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
Are you receiving from a remote computer ?
If yes, does the leak happen when remote is not available ?

Thanks, Doron
--
This posting is provided "AS IS" with no warranties, and confers no

rights.
.

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I have implemented a Service that is responsible for getting messages
from
a
> MS MQ located on a remote machine. I'm getting memory leak from time to time
> (???). In some situation, it is easier to reproduce (e.g.: remote

machine
> not available). After about 1 day, I get a usage of 300MB of memory.
> I have used .NET Memory Profiler tool to try to see where the leak
is > located. For all the leaky instances, I can see the following (I

should say
> that is not too clear what it is trying to show...):
>
> Message..ctor(MessagePropertyFilter)
> MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,

MessagePropertyFilter,
> .....)
> MessageQueue.Receive(TimeSpan)
> MQEvlReceiver.Receive(int) <--------My appl.
> MQReception.DoWork() <--------My appl.
>
> I have check and re-check my code, I cannot see any problem with it.
>
> Does anyone knows about a leak with MQ in a similar case?
>
> Here is my config:
> W2K sp3 english
> .NET 1.1
>
> Thanks,
> José
>
>



Nov 15 '05 #9
Not yet, sorry.

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

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
Any news?

By the way, I have posted a detail about what I do just above in the same
thread.

José
"Doron Juster [MSFT]" <Do****@Online.Microsoft.com> wrote in message
news:uG**************@TK2MSFTNGP09.phx.gbl...
Thanks, I'll see if I can reproduce this.

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

rights.
.

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
As far as I see it, it append "only" when the remote is not available

José
"Doron Juster [MSFT]" <Do****@Online.Microsoft.com> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
> Are you receiving from a remote computer ?
> If yes, does the leak happen when remote is not available ?
>
> Thanks, Doron
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> .
>
> "José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
> news:e7**************@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > I have implemented a Service that is responsible for getting messages from
> a
> > MS MQ located on a remote machine. I'm getting memory leak from time
to
> time
> > (???). In some situation, it is easier to reproduce (e.g.: remote
machine
> > not available). After about 1 day, I get a usage of 300MB of
memory. > > I have used .NET Memory Profiler tool to try to see where the leak

is > > located. For all the leaky instances, I can see the following (I

should
> say
> > that is not too clear what it is trying to show...):
> >
> > Message..ctor(MessagePropertyFilter)
> > MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,
MessagePropertyFilter,
> > .....)
> > MessageQueue.Receive(TimeSpan)
> > MQEvlReceiver.Receive(int) <--------My appl.
> > MQReception.DoWork() <--------My appl.
> >
> > I have check and re-check my code, I cannot see any problem with it. > >
> > Does anyone knows about a leak with MQ in a similar case?
> >
> > Here is my config:
> > W2K sp3 english
> > .NET 1.1
> >
> > Thanks,
> > José
> >
> >
>
>



Nov 15 '05 #10
Hi, it is very similar to the case what we have run to. One question, does
your Service open database connection and access database? It seems not
related to the memory leak, but we found it is.

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from a MS MQ located on a remote machine. I'm getting memory leak from time to time (???). In some situation, it is easier to reproduce (e.g.: remote machine
not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should say that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter,
.....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José

Nov 15 '05 #11
Hi,

No, I do not access any dB from that Service.¨

Anyway, thanks!

José
"jeff" <af****@hotmail.com> wrote in message
news:e5****************@TK2MSFTNGP09.phx.gbl...
Hi, it is very similar to the case what we have run to. One question, does
your Service open database connection and access database? It seems not
related to the memory leak, but we found it is.

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time to

time
(???). In some situation, it is easier to reproduce (e.g.: remote

machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I should

say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR, MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José


Nov 15 '05 #12
Hi, Please check out this artile:
http://groups.google.com/groups?hl=e...readm=cax673%2
4fCHA.1524%40cpmsftngxa08&rnum=8&prev=/groups%3Fq%3Dopen%2Bconnection%2Bmsmq
%2Bmessage%2Bmemory%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den

We had exactly the same situation the article says. And we found a work
around is if you open DB connection in another thread, there will not be
memory leak.

Hope this is a clue. Good luck!

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
Hi,

No, I do not access any dB from that Service.¨

Anyway, thanks!

José
"jeff" <af****@hotmail.com> wrote in message
news:e5****************@TK2MSFTNGP09.phx.gbl...
Hi, it is very similar to the case what we have run to. One question, does
your Service open database connection and access database? It seems not
related to the memory leak, but we found it is.

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have implemented a Service that is responsible for getting messages from
a
MS MQ located on a remote machine. I'm getting memory leak from time

to time
(???). In some situation, it is easier to reproduce (e.g.: remote machine not available). After about 1 day, I get a usage of 300MB of memory.
I have used .NET Memory Profiler tool to try to see where the leak is
located. For all the leaky instances, I can see the following (I
should say
that is not too clear what it is trying to show...):

Message..ctor(MessagePropertyFilter)
MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,

MessagePropertyFilter, .....)
MessageQueue.Receive(TimeSpan)
MQEvlReceiver.Receive(int) <--------My appl.
MQReception.DoWork() <--------My appl.

I have check and re-check my code, I cannot see any problem with it.

Does anyone knows about a leak with MQ in a similar case?

Here is my config:
W2K sp3 english
.NET 1.1

Thanks,
José



Nov 15 '05 #13
Thanks,

However, the problem I face occurs only when the machine where the queue is
not located is not reachable.
Otherwise, I do not see any leak.
In my context, the queue is located on the machine writter and the reader
needs to remotly access it.

The machine where the reader is located is a production server where no dB
is installed.

José

"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
Hi, Please check out this artile:
http://groups.google.com/groups?hl=e...readm=cax673%2 4fCHA.1524%40cpmsftngxa08&rnum=8&prev=/groups%3Fq%3Dopen%2Bconnection%2Bmsmq %2Bmessage%2Bmemory%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den

We had exactly the same situation the article says. And we found a work
around is if you open DB connection in another thread, there will not be
memory leak.

Hope this is a clue. Good luck!

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
Hi,

No, I do not access any dB from that Service.¨

Anyway, thanks!

José
"jeff" <af****@hotmail.com> wrote in message
news:e5****************@TK2MSFTNGP09.phx.gbl...
Hi, it is very similar to the case what we have run to. One question, does your Service open database connection and access database? It seems not related to the memory leak, but we found it is.

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I have implemented a Service that is responsible for getting messages
from
a
> MS MQ located on a remote machine. I'm getting memory leak from time to time
> (???). In some situation, it is easier to reproduce (e.g.: remote

machine
> not available). After about 1 day, I get a usage of 300MB of memory.
> I have used .NET Memory Profiler tool to try to see where the leak
is > located. For all the leaky instances, I can see the following (I

should say
> that is not too clear what it is trying to show...):
>
> Message..ctor(MessagePropertyFilter)
> MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,

MessagePropertyFilter,
> .....)
> MessageQueue.Receive(TimeSpan)
> MQEvlReceiver.Receive(int) <--------My appl.
> MQReception.DoWork() <--------My appl.
>
> I have check and re-check my code, I cannot see any problem with it.
>
> Does anyone knows about a leak with MQ in a similar case?
>
> Here is my config:
> W2K sp3 english
> .NET 1.1
>
> Thanks,
> José
>
>



Nov 15 '05 #14
Hi, Jose,

Since we were investigating our MSMQ memory leak problem these days. We have
a simple test program to repeat our problem. I modified the test program to
simulate your situation, and we also use Memory Profiler to monitor the
memory.

Test program runs on one machine, and the public queue is on another
machine. At beginning, Test program can send and read messages just fine. No
memory leak as you said. Then I unpluged the network cable of the test
program machine, make the public queue mahcine unreachable, and the Test
program got "Error occurs when reading from a queue on a remote computer"
error. But still, I didn't see any memory leak, and GC worked just fine.
So, if you have a small test program which can repeat your problem, that
could be little easier to figure it out.

good luck,

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:eT*************@TK2MSFTNGP11.phx.gbl...
Thanks,

However, the problem I face occurs only when the machine where the queue is not located is not reachable.
Otherwise, I do not see any leak.
In my context, the queue is located on the machine writter and the reader
needs to remotly access it.

The machine where the reader is located is a production server where no dB
is installed.

José

"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
Hi, Please check out this artile:

http://groups.google.com/groups?hl=e...readm=cax673%2

4fCHA.1524%40cpmsftngxa08&rnum=8&prev=/groups%3Fq%3Dopen%2Bconnection%2Bmsmq
%2Bmessage%2Bmemory%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den

We had exactly the same situation the article says. And we found a work
around is if you open DB connection in another thread, there will not be
memory leak.

Hope this is a clue. Good luck!

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
Hi,

No, I do not access any dB from that Service.¨

Anyway, thanks!

José
"jeff" <af****@hotmail.com> wrote in message
news:e5****************@TK2MSFTNGP09.phx.gbl...
> Hi, it is very similar to the case what we have run to. One question,
does
> your Service open database connection and access database? It seems not > related to the memory leak, but we found it is.
>
> -jeff
>
>
>
> "José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
> news:e7**************@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > I have implemented a Service that is responsible for getting messages from
> a
> > MS MQ located on a remote machine. I'm getting memory leak from
time
to
> time
> > (???). In some situation, it is easier to reproduce (e.g.: remote
machine
> > not available). After about 1 day, I get a usage of 300MB of

memory. > > I have used .NET Memory Profiler tool to try to see where the leak

is > > located. For all the leaky instances, I can see the following (I

should
> say
> > that is not too clear what it is trying to show...):
> >
> > Message..ctor(MessagePropertyFilter)
> > MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,
MessagePropertyFilter,
> > .....)
> > MessageQueue.Receive(TimeSpan)
> > MQEvlReceiver.Receive(int) <--------My appl.
> > MQReception.DoWork() <--------My appl.
> >
> > I have check and re-check my code, I cannot see any problem with it. > >
> > Does anyone knows about a leak with MQ in a similar case?
> >
> > Here is my config:
> > W2K sp3 english
> > .NET 1.1
> >
> > Thanks,
> > José
> >
> >
>
>



Nov 15 '05 #15
Hello again,

I think you are right, I have to make a small program to prove what I said.
The only problem is that I'm currently under stress regarding the project. I
will do it at a later stage.

José
"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP10.phx.gbl...
Hi, Jose,

Since we were investigating our MSMQ memory leak problem these days. We have a simple test program to repeat our problem. I modified the test program to simulate your situation, and we also use Memory Profiler to monitor the
memory.

Test program runs on one machine, and the public queue is on another
machine. At beginning, Test program can send and read messages just fine. No memory leak as you said. Then I unpluged the network cable of the test
program machine, make the public queue mahcine unreachable, and the Test
program got "Error occurs when reading from a queue on a remote computer"
error. But still, I didn't see any memory leak, and GC worked just fine. So, if you have a small test program which can repeat your problem, that
could be little easier to figure it out.

good luck,

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:eT*************@TK2MSFTNGP11.phx.gbl...
Thanks,

However, the problem I face occurs only when the machine where the queue

is
not located is not reachable.
Otherwise, I do not see any leak.
In my context, the queue is located on the machine writter and the reader
needs to remotly access it.

The machine where the reader is located is a production server where no dB is installed.

José

"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
Hi, Please check out this artile:

http://groups.google.com/groups?hl=e...readm=cax673%2

4fCHA.1524%40cpmsftngxa08&rnum=8&prev=/groups%3Fq%3Dopen%2Bconnection%2Bmsmq
%2Bmessage%2Bmemory%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den

We had exactly the same situation the article says. And we found a work around is if you open DB connection in another thread, there will not be memory leak.

Hope this is a clue. Good luck!

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:#W**************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> No, I do not access any dB from that Service.¨
>
> Anyway, thanks!
>
> José
> "jeff" <af****@hotmail.com> wrote in message
> news:e5****************@TK2MSFTNGP09.phx.gbl...
> > Hi, it is very similar to the case what we have run to. One question, does
> > your Service open database connection and access database? It seems
not
> > related to the memory leak, but we found it is.
> >
> > -jeff
> >
> >
> >
> > "José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
> > news:e7**************@TK2MSFTNGP10.phx.gbl...
> > > Hi,
> > >
> > > I have implemented a Service that is responsible for getting

messages
> from
> > a
> > > MS MQ located on a remote machine. I'm getting memory leak from time to
> > time
> > > (???). In some situation, it is easier to reproduce (e.g.:
remote > machine
> > > not available). After about 1 day, I get a usage of 300MB of memory. > > > I have used .NET Memory Profiler tool to try to see where the
leak is
> > > located. For all the leaky instances, I can see the following (I
should
> > say
> > > that is not too clear what it is trying to show...):
> > >
> > > Message..ctor(MessagePropertyFilter)
> > > MessageQueue.ReceiveCurrent(TimeSpan, int, IntPTR,
> MessagePropertyFilter,
> > > .....)
> > > MessageQueue.Receive(TimeSpan)
> > > MQEvlReceiver.Receive(int) <--------My appl.
> > > MQReception.DoWork() <--------My appl.
> > >
> > > I have check and re-check my code, I cannot see any problem with

it. > > >
> > > Does anyone knows about a leak with MQ in a similar case?
> > >
> > > Here is my config:
> > > W2K sp3 english
> > > .NET 1.1
> > >
> > > Thanks,
> > > José
> > >
> > >
> >
> >
>
>



Nov 15 '05 #16
Please also check out this post, it may relate to your problem.
http://groups.google.com/groups?hl=e...ition=us&threa
dm=ef9gTVwLDHA.1720%40TK2MSFTNGP11.phx.gbl&rnum=1& prev=/groups%3Fq%3Ddb%2Bco
nnection%2Bqueue%2Bmessage%2Bmemory%26hl%3Den%26lr %3D%26ie%3DUTF-8%26oe%3DUT
F-8%26edition%3Dus%26selm%3Def9gTVwLDHA.1720%2540TK2 MSFTNGP11.phx.gbl%26rnum
%3D1
good luck,

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:un**************@TK2MSFTNGP09.phx.gbl...
Hello again,

I think you are right, I have to make a small program to prove what I said. The only problem is that I'm currently under stress regarding the project. I will do it at a later stage.

José
"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP10.phx.gbl...
Hi, Jose,

Since we were investigating our MSMQ memory leak problem these days. We have
a simple test program to repeat our problem. I modified the test program

to
simulate your situation, and we also use Memory Profiler to monitor the
memory.

Test program runs on one machine, and the public queue is on another
machine. At beginning, Test program can send and read messages just fine. No
memory leak as you said. Then I unpluged the network cable of the test
program machine, make the public queue mahcine unreachable, and the Test
program got "Error occurs when reading from a queue on a remote computer" error. But still, I didn't see any memory leak, and GC worked just fine.
So, if you have a small test program which can repeat your problem, that
could be little easier to figure it out.

good luck,

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:eT*************@TK2MSFTNGP11.phx.gbl...
Thanks,

However, the problem I face occurs only when the machine where the
queue is
not located is not reachable.
Otherwise, I do not see any leak.
In my context, the queue is located on the machine writter and the

reader needs to remotly access it.

The machine where the reader is located is a production server where
no dB is installed.

José

"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
> Hi, Please check out this artile:
>


Nov 15 '05 #17
Thanks,

I will try this

José
"jeff" <af****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Please also check out this post, it may relate to your problem.
http://groups.google.com/groups?hl=e...ition=us&threa dm=ef9gTVwLDHA.1720%40TK2MSFTNGP11.phx.gbl&rnum=1& prev=/groups%3Fq%3Ddb%2Bco nnection%2Bqueue%2Bmessage%2Bmemory%26hl%3Den%26lr %3D%26ie%3DUTF-8%26oe%3DUT F-8%26edition%3Dus%26selm%3Def9gTVwLDHA.1720%2540TK2 MSFTNGP11.phx.gbl%26rnum %3D1
good luck,

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:un**************@TK2MSFTNGP09.phx.gbl...
Hello again,

I think you are right, I have to make a small program to prove what I said.
The only problem is that I'm currently under stress regarding the project. I
will do it at a later stage.

José
"jeff" <af****@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP10.phx.gbl...
Hi, Jose,

Since we were investigating our MSMQ memory leak problem these days. We
have
a simple test program to repeat our problem. I modified the test
program to
simulate your situation, and we also use Memory Profiler to monitor

the memory.

Test program runs on one machine, and the public queue is on another
machine. At beginning, Test program can send and read messages just

fine.
No
memory leak as you said. Then I unpluged the network cable of the test
program machine, make the public queue mahcine unreachable, and the Test program got "Error occurs when reading from a queue on a remote

computer" error. But still, I didn't see any memory leak, and GC worked just

fine.
So, if you have a small test program which can repeat your problem, that could be little easier to figure it out.

good luck,

-jeff

"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:eT*************@TK2MSFTNGP11.phx.gbl...
> Thanks,
>
> However, the problem I face occurs only when the machine where the queue is
> not located is not reachable.
> Otherwise, I do not see any leak.
> In my context, the queue is located on the machine writter and the

reader
> needs to remotly access it.
>
> The machine where the reader is located is a production server where

no
dB
> is installed.
>
> José
>
> "jeff" <af****@hotmail.com> wrote in message
> news:Of**************@TK2MSFTNGP09.phx.gbl...
> > Hi, Please check out this artile:
> >
>


Nov 15 '05 #18

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

Similar topics

8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
4
by: Don Nell | last post by:
Hello Why is there a memory leak when this code is executed. for(;;) { ManagementScope scope = new ManagementScope(); scope.Options.Username="username"; scope.Options.Password="password";...
20
by: jeevankodali | last post by:
Hi I have an .Net application which processes thousands of Xml nodes each day and for each node I am using around 30-40 Regex matches to see if they satisfy some conditions are not. These Regex...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
8
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
7
by: Ragnar Agustsson | last post by:
Hi all I have been wandering about the best way to sandbox memory leaks in 3rd party libraries when using them from the .Net framework. I have a 3rd party library, written in C++, that leaks a...
22
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several reports at one time. My problem - there is a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.