Memory leak while performing standard select queries ina FOR loop

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Memory leak while performing standard select queries ina FOR loop

    Hi -

    I was wondering if someone can help me out with this issue.

    1. We are pulling information from a struct/object in order to construct
    queries.
    2. These queries are dynamically constructed within loops - a query would be
    performed, a list of columns would be retrieved to be stored in a result
    object, I would get a specific foreign key and use it to delivery another
    query, get the new queries columns and values etc.
    3. the queries are strings sent over to a method within the coldfusion
    component.
    4. The method actually performs the query and returns a query object for use.

    The problems are:

    1. The page executes fine the first time. In fact, it executes fine on average
    two more times, for a total of three times.
    2. On the fourth iteration, Windows Task Manager suddenly has a huge spike in
    memory usage attributed to jrun.exe - at about 500 Megs, the dev system slows
    to a crawl.
    3. I have to restart the server in order for it to work.
    4. (this code was also tested through Flash Remoting, and I got an out of
    memory error through that)

    The challenges:
    1. There is nothing syntactically wrong with the code (it shows up with no
    errors, in fact, as mentioned, it executes a few times as demonstrated with a
    CFDUMP tag.
    2. There is nothing syntactically wrong with the component that performs the
    query and returns the query object (again, it executes and returns a query
    object).
    3. The debug window reports nothing wrong. 14 SELECT queries are executed in
    total as a result of the loop - when the page works the first few times.

    I even added a small pause in the code to see if a delay might resolve the
    problem (it doesn't).
    Anyone have any general causes that might result in this problem? I have done
    the google search, and other than general server settings (which we have played
    with), reviewing server logs (which in fact pointed to an out of memory error -
    with 1 Gig of RAM running its hard to believe) and JRun suddenly "spiking" in
    both memory and CPU utilization, the problem has become quite muddled.


    thanks


    eapostol Guest

  2. Similar Questions and Discussions

    1. #39438 [NEW]: Memory leak PHP Fatal error: Out of memory
      From: nikolas dot hagelstein at gmail dot com Operating system: NETBSD 3.0.1 AMD64 PHP version: 5.2.0 PHP Bug Type: ...
    2. SQL Memory Leak
      Did anybody find any answers to this problem. We've been monitoring memory usage with fusion Reactor and there is clearly a leak. You can see a...
    3. memory problem/memory leak
      Hi I have a problem with shockwave player running in Internet Explorer. My program consists of a controller movie which loads in content files in...
    4. Memory consumption of Ruby/mod_ruby combo on Apache [memory leak]
      > I don't think so - I think all the modules are loaded when Apache is It didn't have anything to do with IfModules or even Apache. I had a...
    5. Help with loop inside loop and mysql queries
      Hi List. I cannot see my error: I have relation tables setup. main id entity_name main_type etc etc date_in 1 test type1 x y 2003-06-02...
  3. #2

    Default Re: Memory leak while performing standard select queriesin a FOR loop

    It appears to have been fixed. I converted most of the CFML code to
    cfscript...and it works now?

    strange...what does that say about CFML when I have to use actionscript like
    syntax to get the job done at the end of the day?

    :confused;

    eapostol Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139