Memory Leak Looping cfmodule inside cffunction

后端 未结 3 649
既然无缘
既然无缘 2020-12-18 00:33

Googlers if you\'ve got a heap dump with a root of coldfusion.runtime.CFDummyComponent read on.

Update 2/22/2011

Marc Esher of MXUnit fame fou

3条回答
  •  鱼传尺愫
    2020-12-18 00:52

    This problem manifests with lots of tags unfortunately. I've seen this with cflock inside cfthread. Write a very long running loop in a cfthread that uses cflock, you'll run out of memory eventually. It takes a long time, but it happens. I bet the retention problem exists in regular requests too, but you don't usually have a loop that runs hundreds of thousands of times with a cflock inside so no one notices.

    I reported this bug a long time ago, but it never got fixed: http://www.elliottsprehn.com/cfbugs/bugs/83359

    The best solution for now is to not use cfmodule inside a loop like this. Custom tags really weren't intended for calling 20k times in a single request. You're going to want to use UDFs instead. cfmodule is extremely expensive anyway and using a UDF will be noticeably faster.

提交回复
热议问题