I wrote a script database load in ColdFusion, and I had a problem with the script ending up slowly. I split each table load into its own thread using <cfthread> and I call the garbage collector when the memory drops below 50% (while you have 30 seconds between gc () calls to prevent garbage collection from the hogging memory).
I created CFC to store all the requests needed for the script. The script calls the corresponding CFC function, which then returns a request, some of which are larger than 2 MB. When I look in the "Server Monitor" in a detailed view of the "Memory" page for "Active threads", it looks like my CFC keeps a copy of the request in memory, although I varscoped in the request variable and the variable went out of scope at the end of the function. In addition, I have a copy of the request in memory in my stream. So I stayed with what looks like two copies of the request in memory. Is this really what is going on? If so, how can I delete one copy of the request from memory?
coldfusion cfc
stomcavage
source share