I have an unbelievably odd bug. I have a function that returns a long JSON string for an HTML page editor. A few pages are displaying an issue where the JSON string is generated fine, but it takes over 4 minutes to actually return it. The function basically gets the JSON string from the SQL DB and returns it. I put a dump right before my cfreturn and the dump is generated as quick as would be expected but the cfreturn takes over four minutes.
Now, the kicker. If I remove one character from the JSON, any character, it is returned fine. If I add any character, the JSON string is returned fine. There are no errors thrown, it works the same in Chrome or Safari, the Chrome Web Inspector Network tab says “Pending” for status. The request shows as complete in 40ms or so in FusionReactor even when it takes 4 minutes to display in the browser. No console errors in either browser. Can reproduce in Dev using the same JSON from Prod. When the JSON does finally render, I get the “Ensure that Tomcat is running on given host…” error message at first and then the rest of the JSON.
Other pages with different character lengths are displaying the same issue. I checked to make sure the character count wasn’t evenly divisible by 666 to make sure it wasn’t a Halloween developer prank. It’s not.
Any ideas what’s going on?
OS : Windows Server 2016 (10.0) 64bit Java Version : 11.0.22 (Eclipse Adoptium) 64bit Tomcat Version : Apache Tomcat/9.0.86 Lucee Version : Lucee 5.4.5.23
Dumps of LARGE JSON objects are typically demanding.
Your mention of removing any character suggests a formatting incompatibility.
But without seeing the CODE… can’t help much…
Thanks for the replies all. The code really is this simple, but hopefully you’ll find some useful information in here. The JSON is stored in the DB. I left the dump in because the dump shows that the function has completed except for the cfreturn.
There is a curly single quote in one of the JSON strings. We do have another JSON string with a number of curly quotes in it that works fine. Thinking about removing those when entered into the editor.
I mean from the webserver itself, depending on what you are using that will vary.
If you want to confirm it’s even enabled before digging further, you will see the Header in the response using the Developer Tools in your browser as below:
That was just to check and see if the problem was inside the function or something external. It still takes about four minutes to process whether the dump is there or not.
Does the same happen when you access the Lucee port 8888 directly from the same machine(locally)? Just to rule any networking/firewall/webserver/connector stuff out.