Memory Leak in .Net remoting framework v1.1 ?

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

Guest

Does anyone now about memory leaks in the .Net remoting framework v1.1


I have been doing some stress testing with multiple threads on a remote object (extended from ContextBoundObject)

At first I thought that the memory leak was being caused by the implementation of the remote method, but eventually

removed all the code returning only a single string from the method. When I run a memory profiler on the processes

instances of the following two classes are never garbage collected, they stay live until the process terminates

System.Net.Sockets.Overlappe

System.Threading.OverlappedAsync


I never create instances of these classes directly so I assume its the underlying remoting (http binary) channel that create

them.


If anyone reading this has come across a similar problem or can point out what I might be doing wrong in my implementation, any help would be greatly appreciated


Regard

Hennie Walter

(e-mail address removed)
 
Are you by chance testing using a Console application? I ran into what I
thought was a remoting memory leak similar to what you are seeing. In the
end, the garbage collector was running but was unable to collect objects
created on main thread as I had it blocked by Console.ReadLine() to prevent
the console window from closing.

The solution was to change the Main method attribute from [STAThread] to
[MTAThread] which allows the garbage collector threads into the apartment -
all memory leaks then ceased without changing another single thing.

See this article in Google (different circumstances - same type of outcome):

http://groups.google.com/groups?hl=...-8&[email protected]


Hope this helps
Tom



Hennie Walters said:
Does anyone now about memory leaks in the .Net remoting framework v1.1 ?



I have been doing some stress testing with multiple threads on a remote
object (extended from ContextBoundObject).
At first I thought that the memory leak was being caused by the
implementation of the remote method, but eventually I
removed all the code returning only a single string from the method. When
I run a memory profiler on the processes
instances of the following two classes are never garbage collected, they
stay live until the process terminates.
System.Net.Sockets.Overlapped

System.Threading.OverlappedAsynch



I never create instances of these classes directly so I assume its the
underlying remoting (http binary) channel that creates
them.



If anyone reading this has come across a similar problem or can point out
what I might be doing wrong in my implementation, any help would be greatly
appreciated.
 
Tom... Is your suggest works for me..

I'll LOVE YOU FOR EVER!!!!!!

I am modifying now my project putting the "MTAThread" tomorrow I'll know if
works or not :)


AA

Tom Hall said:
Are you by chance testing using a Console application? I ran into what I
thought was a remoting memory leak similar to what you are seeing. In the
end, the garbage collector was running but was unable to collect objects
created on main thread as I had it blocked by Console.ReadLine() to prevent
the console window from closing.

The solution was to change the Main method attribute from [STAThread] to
[MTAThread] which allows the garbage collector threads into the apartment -
all memory leaks then ceased without changing another single thing.

See this article in Google (different circumstances - same type of outcome):http://groups.google.com/groups?hl=...-8&[email protected]


Hope this helps
Tom



Hennie Walters said:
Does anyone now about memory leaks in the .Net remoting framework v1.1 ?



I have been doing some stress testing with multiple threads on a remote
object (extended from ContextBoundObject).
At first I thought that the memory leak was being caused by the
implementation of the remote method, but eventually I
removed all the code returning only a single string from the method.
When
I run a memory profiler on the processes
instances of the following two classes are never garbage collected, they
stay live until the process terminates.
System.Net.Sockets.Overlapped

System.Threading.OverlappedAsynch



I never create instances of these classes directly so I assume its the
underlying remoting (http binary) channel that creates
them.



If anyone reading this has come across a similar problem or can point
out
what I might be doing wrong in my implementation, any help would be greatly
appreciated.



Regards

Hennie Walters

(e-mail address removed)
 
Can't you just feel the love in the room :-)

In my situation it took days/weeks to build up enough memory leakage to
become a nuisance - but I only have maybe a transaction a minute on average
24/6.

Tom


AA said:
Tom... Is your suggest works for me..

I'll LOVE YOU FOR EVER!!!!!!

I am modifying now my project putting the "MTAThread" tomorrow I'll know if
works or not :)


AA

Tom Hall said:
Are you by chance testing using a Console application? I ran into what I
thought was a remoting memory leak similar to what you are seeing. In the
end, the garbage collector was running but was unable to collect objects
created on main thread as I had it blocked by Console.ReadLine() to prevent
the console window from closing.

The solution was to change the Main method attribute from [STAThread] to
[MTAThread] which allows the garbage collector threads into the apartment -
all memory leaks then ceased without changing another single thing.

See this article in Google (different circumstances - same type of outcome):
http://groups.google.com/groups?hl=...-8&[email protected]
Hope this helps
Tom



remote
object (extended from ContextBoundObject).
implementation of the remote method, but eventually I When
I run a memory profiler on the processes they
stay live until the process terminates.
underlying remoting (http binary) channel that creates out
what I might be doing wrong in my implementation, any help would be greatly
 
Back
Top