Here is how my day has gone so far
I am debugging an issue with a application view that is killing my local server.
I am calling a get() method from a component and the server hangs, never to return.
WOW! That must be a nasty query. Yes, Yes it is.
Well, slightly nasty. I got my queryparams in place, so that's not the issue. Actually, not that nasty at all. Several sizable tables (i have select * for tables - i know, i Know, bad practice. but this is 4 year old code)
Hmm... maybe I am missing something.
Let's go talk to the dba and have her fire up their monitoring. Almost no activity coming from the Coldfusion Server.
Hmmm... (again).
Run the query directly against the database? OK, response is immediate.
Fire up CF Server Monitor.
How! Request is super slow but the memory usage is through the roof! 700MB
Does lots of queryparams (espesially used with list and WHERE IN cluases) cause memory useage?
Google...
Nothing.
Try to simplify query, just to test...
Still timesout.
What?
What is this that I see?
<cfdump var="#queryResult#">
right before the <cfreturn queryResult>
Ooooooohhhhhhhhhh!!!
I must have thrown that in once for debugging but just switched the Output attribute of the function to "false" and left that cfdump tag in.
In most cases, that's not a problem or at least not noticable. But this query (being slightly nasty as I stated earlier and containing select *) contained a lot lot lot of data, and in some cases, returns a bunch of rows.
So leason learned
Apparently, throwing debuging info into a component's method and then turning off output does indeed keep it form being outputted to the page, BUT it does not prevent it from actually being generated.
In this case it was a very large record set and so the cfdump output was huge.
I am still not sure why it caused THIS MANY problems. I have dumped huge objects onto a page and, while slow, did not just Kapowee the server.
But from now on I am going to be a little more deciplined in how and when I dump debugging info within CFCs
1 comments - Posted by Jonathan at 7:27 AM - Categories: Oracle | ColdFusion | Debugging | Performance | General | Stupidhead | SQL