tracker issue : CF-3709536

select a category, or use search below
(searches all categories and all time range)

SpreadsheetAddRows has a serious memory leak

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Paul Sussan / Paul Sussan (Paul Sussan)

Created: 02/18/2014

Components: Language

Versions: 10.0

Failure Type: Memory Leak

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server

Vote Count: 1

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_possibly_fixed on August 25, 2019 using build 2016.0.01.298513
Problem Description: SpreadsheetAddRows has a serious memory leak. As the amount of data goes up, the memory used grows exponentially until the server falls over.

Steps to Reproduce: Use <cfset SpreadsheetAddRows(theSheet,query)> with a large query

Actual Result:   java.lang.OutOfMemoryError: GC overhead limit exceeded

Expected Result:   Query rows added

Any Workarounds: pass the query directly  to the cfspreadsheet  tag as an argument

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3709536

External Customer Info:
External Company:  
External Customer Name: psussan1
External Customer Email:  
External Test Config: Windows 2008 Server standard and ColdFusion Standard 10 Update 12



Testing on a new server with 4 gigs of ram and a single logged in user. Generating a 10 column 5,000 row spreadsheet causes java to fall over. This does not seem like an unreasonable amount of data to write on a server running nothing else whatsoever but fails. None of these spreadsheets have anything other than rows of text, no formulas, no formatting, nothing complex whatsoever. This used to work so I suspect that it was introduced with one of the updates.
Comment by External U.
13499 | February 18, 2014 11:38:19 AM GMT
[just "subscribing"] -- Adam
Vote by External U.
13500 | May 09, 2014 03:12:55 AM GMT
Hi Adobe, I've verified this is possibly fixed in CF2016 Update 1 (build 2016.0.01.298513). Unable to repro java.lang.OutOfMemoryError in builds (w/ Java 1.8.0_66) and 2016.0.01.298513 (w/ Java 1.8.0_72) w/ default jvm.config except -Xms1024m -Xmx4096m -Dfile.encoding=UTF-8 -Duser.timezone=GMT, using the following code: <cfscript> myColumnCount = 50; myRowCount = 20000; myQuery = queryNew(""); for(myColumnPos=1; myColumnPos<=myColumnCount; myColumnPos++) { myQuery.addColumn('myColumn' & myColumnPos, "varchar", []); } for(myRowPos=1; myRowPos<=myRowCount; myRowPos++) { myQuery.addRow(); for(myColumnPos=1; myColumnPos<=myColumnCount; myColumnPos++) { myQuery.setCell('myColumn' & myColumnPos, createUUID(), myRowPos); } } mySpreadsheet = spreadsheetNew(); mySpreadsheet.addRows(myQuery); writeOutput(now()); </cfscript> Note: CF's Server Monitor shows the post-test JVM Memory usage level stays ~300MB higher in, but resumes to its original pre-test usage level in 2016.0.01.298513. So perhaps that is what was fixed. But, again, I couldn't repro the actual java.lang.OutOfMemoryError w/ anything close to a 10 column / 5000 row spreadsheetAddRows() (and the timestamp is always displayed) - so perhaps there were other factors at play or I am misunderstanding the issue. Thanks!, -Aaron
Comment by Aaron N.
31209 | August 25, 2019 10:15:11 PM GMT