Still no solution! Memory bug in Services?
-
We have a Windows Service written in C# that simply host some remote components. The service does nothing itself. We have an ASP.NET application that initialises the remoting in global.asax and has a single aspx page that creates the remote component and calls its method, which returns a small string. Thing is that the service process leaks memory. Now I've read most of the articles/books on the wonders of the GC and I know that what I'm seeing is not normal behavour. And here the catch: if I run the application as a standard process, i.e. I replace the call to ServiceBase.Run with a long Sleep statement - the application does not leak memory. The CLR memory performance counters show very different traces of #bytes on heaps running the same test. What could be causing this behaviour? Could anyone from Microsoft check to see if remoting components from a Service has memory issues. In the ASP.NET page I simply release the object by setting the reference to null. My tests run for several hours with several hour of low and high load but the service never reduces it memory. The process version remains very flat. I'm not using any unmanaged resources or any thing that consumes loads of memory just small string (100 characters or so).
-
We have a Windows Service written in C# that simply host some remote components. The service does nothing itself. We have an ASP.NET application that initialises the remoting in global.asax and has a single aspx page that creates the remote component and calls its method, which returns a small string. Thing is that the service process leaks memory. Now I've read most of the articles/books on the wonders of the GC and I know that what I'm seeing is not normal behavour. And here the catch: if I run the application as a standard process, i.e. I replace the call to ServiceBase.Run with a long Sleep statement - the application does not leak memory. The CLR memory performance counters show very different traces of #bytes on heaps running the same test. What could be causing this behaviour? Could anyone from Microsoft check to see if remoting components from a Service has memory issues. In the ASP.NET page I simply release the object by setting the reference to null. My tests run for several hours with several hour of low and high load but the service never reduces it memory. The process version remains very flat. I'm not using any unmanaged resources or any thing that consumes loads of memory just small string (100 characters or so).
Do the remoting components make use of any unmanaged resources / should or do you implement the IDispose interface?