infinite loops

1 view
Skip to first unread message

hampsterx

unread,
Jan 28, 2010, 3:19:53 PM1/28/10
to CFCDev
Hi there,

Spent a painful day yesterday trying to figure out why the JRUN
process was hogging the CPU. Turns out in some cases the request
timout is not adhered to, leaving requests running when they
should'nt.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Elements_11.html

Note: You can get an infinite conditional loop if you do not force an
end condition. In this example, the loop is infinite if you omit the
<cfset i = i + 1> statement. To end an infinite loop, stop the
ColdFusion application server.

http://www.bennadel.com/blog/1667-Learning-ColdFusion-9-Resetting-Applications-With-ApplicationStop-.htm

I've found on several occasions that I'll perhaps have a bug or
bottleneck on an individual application which takes me a while to
trace, until the issue is addressed the application just sits there
hung in an infinite loop or something and this forces me to restart
the entire server which hosts a whole bunch of applications all of
which then have to reinit, potentially also killing any sessions which
are active within those apps at the time of reset.

-----------

<CFLOOP CONDITION="10 GT 9"></CFLOOP>

Error Occurred While Processing Request
The request has exceeded the allowable time limit Tag: CFLOOP

--------

<cfscript>
while(true){}
</cfscript>

Keeps on running!

---------

Can someone please explain to me why this situation arises. Two of
these and the server is completely unresponsive. Tested on CF8.01
WinXP + Win2003. Standard Install.

its not like coldfusion need a fancy infinite loop detection
algorithm. Just need to be able kill off over due requests. Surely the
JRun application can still function even if it has a few wayward
requests running?

Please advise,

TiM


Reply all
Reply to author
Forward
0 new messages