Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Still no solution! Memory bug in Services?

Still no solution! Memory bug in Services?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpperformanceannouncementasp-netdotnet
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    solidstore
    wrote on last edited by
    #1

    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).

    S 1 Reply Last reply
    0
    • S solidstore

      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).

      S Offline
      S Offline
      Simon Gregory
      wrote on last edited by
      #2

      Do the remoting components make use of any unmanaged resources / should or do you implement the IDispose interface?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups