Title:
Bug 86444:[MEsher] We have an application that queries for 1 million + rows, then loops over those rows with cfloop query="records" and performs operations
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): marc esher / marc esher (marcesher)
Created: 02/22/2011
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 30
Problem:
[MEsher] We have an application that queries for 1 million + rows, then loops over those rows with cfloop query="records" and performs operations. Doing so, we would crash our server each time with a heap space error. Changing the loop from cfloop query="records" to cfloop from="1" to="#records.recordcount#" index="i" completely fixed the problem.Seems to me that each loop should be equivalent, and that if using one style of loop can kill a server while another style can work just fine, then that's a bug.I have documented the investigation here: http://wiki.mxunit.org/display/default/How+cfloop+query%3D+killed+a+ColdFusion+server
Method:
1. run a query that returns tons of rows2. do a cfloop query="records" over that returned query3. inside the loop, do something that takes a few milliseconds. I think it's important that the total running time of the page be at least several minutes, so that heap can accumulateIn my experience, when doing this, I saw heap grow till CF crashed, with "looptag" objects consuming it all
Result:
java.lang.OutOfMemoryError java heap space
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043421
External Customer Info:
External Company:
External Customer Name: marc esher
External Customer Email: 70390EBF47F01CAF992015B9
External Test Config: 02/22/2011
Attachments:
Comments: