Fixed
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Zac Spitzer
Zac SpitzerPriority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 1 April 2020 at 10:52
Updated 27 April 2022 at 17:00
Resolved 7 April 2021 at 15:16
<cfscript> filename = Expandpath('.\big.json'); timerType= "outline"; sampleJson = 'https://raw.githubusercontent.com/ozlerhakan/mongodb-json-files/master/datasets/city_inspections.json'; // 24mb //sampleJson = "https://raw.githubusercontent.com/zemirco/sf-city-lots-json/master/citylots.json"; // 189mb function say(mess, mem=false){ echo(mess & "<br>"); if(arguments.mem) writeDump(getMemoryUsage()); cfflush(); } lock name="getBigJson" throwontimeout=true timeout=2{ if (not FileExists(filename)){ setting requesttimeout=1000; http url="#sampleJson#" path="#filename#"; say("sample json downloaded"); } else { say("sample json already downloaded"); } } say("go!"); json = fileRead(filename); //json = "[1,2.3]"; timer type="#timerType#" label="now" { say(now()); } say("now done!", true); s = getTickCount(); timer type="#timerType#" label="DeserializeJson" { x = DeserializeJson(json); x = ""; } say ("DeserializeJson #getTickCount()-s#", true); </cfscript>
at lucee.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:215) at lucee.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:193) at lucee.runtime.functions.conversion.DeserializeJSON.call(DeserializeJSON.java:52) at lucee.runtime.functions.conversion.DeserializeJSON.call(DeserializeJSON.java:48)
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java
this behaves differently, sometimes OOM, other times it throws a syntax error which then logs out the entire json string as the exception message.
this json sample is 24mb, it should never be all logged out. the exception message should be always be short and understandable.
it's three times worse, coz the message gets logged out three times https://luceeserver.atlassian.net/browse/LDEV-2781#icft=LDEV-2781
also, I think the memory isn't being released as the exception is kept in memory with debugging enabled
also when this runs successfully, the DeserializeJson timer output doesn't work either?