By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

MQ memory leak

P: n/a
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
Share this Question
Share on Google+
17 Replies


P: n/a
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

P: n/a
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

P: n/a
>
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.