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. Visual Basic
  4. Remoter Server Size grows

Remoter Server Size grows

Scheduled Pinned Locked Moved Visual Basic
helpsysadminbusinessperformancequestion
6 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.
  • D Offline
    D Offline
    Daredeviljpr
    wrote on last edited by
    #1

    Hi, I have an intranet application that uses remoteserver to access the Business and Data Access layer. The remoteserver is singleton. The application is working fine but with time the remoteserver size in memory increase and then closes down throwing OUT OF MEMORY exception. The size when it is started is 30 MB but within hours it grows to 1 GB. Can any one help me solve this problem?

    L 1 Reply Last reply
    0
    • D Daredeviljpr

      Hi, I have an intranet application that uses remoteserver to access the Business and Data Access layer. The remoteserver is singleton. The application is working fine but with time the remoteserver size in memory increase and then closes down throwing OUT OF MEMORY exception. The size when it is started is 30 MB but within hours it grows to 1 GB. Can any one help me solve this problem?

      L Offline
      L Offline
      Leeland
      wrote on last edited by
      #2

      It sounds like you're loading classes multiple times and not calling the dispose method. These are very tricky to diagnose. I would start it up on your development PC and track the resources being used in the locals window.

      D 1 Reply Last reply
      0
      • L Leeland

        It sounds like you're loading classes multiple times and not calling the dispose method. These are very tricky to diagnose. I would start it up on your development PC and track the resources being used in the locals window.

        D Offline
        D Offline
        Daredeviljpr
        wrote on last edited by
        #3

        Since it is Singleton the objects are created when there is a call and all future calls are served by the same object. I have used memory profiler and it shows only 1 instance of each object so that is not the issue.

        L 1 Reply Last reply
        0
        • D Daredeviljpr

          Since it is Singleton the objects are created when there is a call and all future calls are served by the same object. I have used memory profiler and it shows only 1 instance of each object so that is not the issue.

          L Offline
          L Offline
          Leeland
          wrote on last edited by
          #4

          Yes, Singleton will have only one instance of that class running. However, that's not to say that the objects within it aren't spawning out of control. Using memory profiler will show the full memory useage of the class itself. It won't let you break down the different components. That's why I suggested to use the locals window of VS.

          D 1 Reply Last reply
          0
          • L Leeland

            Yes, Singleton will have only one instance of that class running. However, that's not to say that the objects within it aren't spawning out of control. Using memory profiler will show the full memory useage of the class itself. It won't let you break down the different components. That's why I suggested to use the locals window of VS.

            D Offline
            D Offline
            Daredeviljpr
            wrote on last edited by
            #5

            Seems you are correct. The Handler class that communicates with the UI and DatAccess layer has more than 1 instance which I think should not happen if Remoteserver is Singleton. What do you say?

            L 1 Reply Last reply
            0
            • D Daredeviljpr

              Seems you are correct. The Handler class that communicates with the UI and DatAccess layer has more than 1 instance which I think should not happen if Remoteserver is Singleton. What do you say?

              L Offline
              L Offline
              Leeland
              wrote on last edited by
              #6

              hmmmm....I can't think of any "good" reason for it to have multiple instances. Theoretically, the app should only have one data _connection_, but could spawn off new instances until it runs out of memory. Considering that it's singleton, it should only be able to use one instance at a time. Try creating your instance in a global scope and see if that helps. either that, or add a dispose to instance each time it's called. That will mark it for cleanup through the garbage collector. Either way should narrow that down to one active instance. Once that's done, I'd recommend scanning the app again for any other objects that are being handled in a similar fashion.

              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