Results 1 to 10 of 13

Thread: Memory Leak on cWebDynamicObjectContainer?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Castlegar, BC Canada
    Posts
    4,854

    Default Memory Leak on cWebDynamicObjectContainer?

    I have a fairly large WebApp that
    • runs 24/7
    • at peak times sees about 200 people logged in.
    • currently written in DF20.1
    • uses SPLF
    • every day at 2AM, I have the Sessions reload.


    I have been watching the memory for the sessions progress and change through the day in the Task Manager on the SPLF slaves.

    Each day when the sessions reload at 2am, the memory for each WebApp.exe process starts at about 72k and they continually grow throughout the day ending up usually around 1.5mb in size!

    After studying this behavior and testing/looking for memory leaks, I have found that the culprit(s) are any view that has a cWebDynamicObjectContainer. And you can easily see this too in the WebOrder 20.1 sample.


    • Open up the WebOrder 20.1 demo
    • Demo.Dynamic Object
    • Open up the Task Manager Window under details so you can watch the WebApp.exe memory size
    • In the WebApp, click on any of the "+" buttons (I chose "Business Work Books")
    • Don't click on any other button, just the same "+" button
    • Watch the memory use in the WebApp just continue to grow and grow


    I use the cDynamicObjectContainer in several places in my WebApp and they are both used often by users and can easily have 50 or more dynamic objects created.

    I have tried different methods to get the webapp to "release" this memory but nothing seems to work and the memory use just keeps growing.

    • Each time the cDynamicObjectContainer is used, I issue a ResetContainer to the object before I rebuild it.
    • I have also tried sending DestroyDynamicObject (which seems to do nothing)
    • I have tried sending Destroy to the object handle of each Dynamic Object (which just ends up getting an error)


    It seems to me that something in the depths of the "ResetContainer" should handle releasing of the memory

    Click image for larger version. 

Name:	Snap525.gif 
Views:	22 
Size:	41.0 KB 
ID:	16702
    after about 10 clicks memory use grows
    Click image for larger version. 

Name:	Snap526.gif 
Views:	21 
Size:	5.6 KB 
ID:	16703

    after about 10 more clicks memory use just keeps getting bigger
    Click image for larger version. 

Name:	Snap527.gif 
Views:	22 
Size:	10.4 KB 
ID:	16704

    Any thoughts/ideas welcome.

    PS Tested in DF20.1 and 23.0... same result
    Last edited by Mike Cooper; 29-Feb-2024 at 06:49 AM. Reason: forgot to add the pictures

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •