RE: How to stop an infinite CF loop?
We didn't shut the service down right away because what it was doing was mild and our live system had people logged in and was running counts and orders. We has access to the code. We tried forcing the template to error out, but the system had cached it and was ignoring all the updates we were making. We checked for scheduling. We're just looking for a way to deal with situations like this from a remote location. We've been considering the custom tag that allows control of services. I was hoping there was another way other than shutting down the service. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 7:47 PM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? I can't believe you didn't immediately shut down the CF server if you suspected there was a template running amok. I'm aware of only two things that would cause a working template to terminate prematurely. The first is if the request timeout is met. You have a default template timeout set for the CF server in the Administrator, but if the template were called with ?RequestTimeout=xx, it is overridden. Trouble with this is that anyone can alter the request timeout by simply putting that url parameter in the request. The other would be to kill the CF application server. There might have been some other things you could have done to either cause an error or alleviate the problem. If you knew what the rogue template was doing, and had access to the code you could do this. You might have shut down the email server, for example. None of those would have been nearly as effective as simply shutting down CF server. One thing you'd need to watch out for would be whether the template had scheduled itself using CFSCHEDULE to start up again at a later time. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
I agree. But there are times when everyone writes something that ends up doing the unexpected. And all he did was name the custom tag the same as the template calling it... Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Seth Petry-Johnson [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 8:39 PM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? The best solution is to hire programmers that don't write infinite loops g. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: How to stop an infinite CF loop?
have you isolated the tag? If so why not just fix it. - Original Message - From: "Lon Lentz" [EMAIL PROTECTED] To: "cftalk" [EMAIL PROTECTED] Sent: Monday, June 12, 2000 8:33 AM Subject: How to stop an infinite CF loop? I had posted this question, in a slightly more vague way, a couple weeks ago. Well, the theoretical happened and I was wondering if anyone might have a solution to head off such future occurrences. It seems that a no-longer-here developer had written a template where in when conditions were met, a custom tag was called, and an email was generated. He had named his custom tag the same as the calling template. Well, the conditions were finally met, and in the end, some poor woman got 116,000 emails. So, with an example this time, is there a straight forward way of shutting this loop down? Possibly a way of setting up a template to do it? Someway other than shutting the service down? We ended up having to kill the service to stop it. We initially tried making changes to the template hoping to force it to error out...but the system had cached all of the pertinent information and was on cruise control. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=li sts/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=li sts/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: How to stop an infinite CF loop?
hi, I seemed to have had the same problem with CF where according to some people say that the code runs into an infinite loop. And that is not possible cause i triple checked the code. Only here the code apparently queries SQL over and over a period of time the server crashes because it runs out of memory ! If it receives more than 200 active connections at a time ... it goes kaput !: ) I cant seem to isolate the problem to a specific page ...Atleast then I would know where the error is happening. regards vince At 09:33 AM 6/12/00 -0400, Lon Lentz wrote: I had posted this question, in a slightly more vague way, a couple weeks ago. Well, the theoretical happened and I was wondering if anyone might have a solution to head off such future occurrences. It seems that a no-longer-here developer had written a template where in when conditions were met, a custom tag was called, and an email was generated. He had named his custom tag the same as the calling template. Well, the conditions were finally met, and in the end, some poor woman got 116,000 emails. So, with an example this time, is there a straight forward way of shutting this loop down? Possibly a way of setting up a template to do it? Someway other than shutting the service down? We ended up having to kill the service to stop it. We initially tried making changes to the template hoping to force it to error out...but the system had cached all of the pertinent information and was on cruise control. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
Actually, this was the first time this has happened with this tag. We renamed the tag and solved the problem. I'm just looking for a possible way of stopping a similar situation in the future. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Fred T. Sanders [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 4:12 AM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? have you isolated the tag? If so why not just fix it. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
There is no way to stop an individual template during execution. The only way to stop it is to cycle the service. Chris Evans [EMAIL PROTECTED] http://www.fuseware.com -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 9:48 AM To: [EMAIL PROTECTED] Subject: RE: How to stop an infinite CF loop? Actually, this was the first time this has happened with this tag. We renamed the tag and solved the problem. I'm just looking for a possible way of stopping a similar situation in the future. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Fred T. Sanders [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 4:12 AM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? have you isolated the tag? If so why not just fix it. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: How to stop an infinite CF loop?
What about using these settings in the Admin? Timeout requests Set a value to limit the amount of time ColdFusion waits before terminating a request. Restart unresponsive server This option allows you to restart the ColdFusion Server service (daemon) in the event some ColdFusion component does not respond within the specified amount of time. ~J - Original Message - From: Chris Evans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 19, 2000 2:58 PM Subject: RE: How to stop an infinite CF loop? There is no way to stop an individual template during execution. The only way to stop it is to cycle the service. Chris Evans [EMAIL PROTECTED] http://www.fuseware.com -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 9:48 AM To: [EMAIL PROTECTED] Subject: RE: How to stop an infinite CF loop? Actually, this was the first time this has happened with this tag. We renamed the tag and solved the problem. I'm just looking for a possible way of stopping a similar situation in the future. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Fred T. Sanders [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 4:12 AM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? have you isolated the tag? If so why not just fix it. -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
Restart unresponsive server tracks unresponsive threads, and will restart the service if there are a certain number of unresponsive threads. If you have this set to 5, you would need 5 infinite loops before this would kick in. Timeout requests would limit the damage from an infinite loop. Chris Evans [EMAIL PROTECTED] http://www.fuseware.com -Original Message- From: Justin v0.9 MacCarthy [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 10:06 AM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? What about using these settings in the Admin? Timeout requests Set a value to limit the amount of time ColdFusion waits before terminating a request. Restart unresponsive server This option allows you to restart the ColdFusion Server service (daemon) in the event some ColdFusion component does not respond within the specified amount of time. ~J - Original Message - From: Chris Evans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 19, 2000 2:58 PM Subject: RE: How to stop an infinite CF loop? There is no way to stop an individual template during execution. The only way to stop it is to cycle the service. Chris Evans [EMAIL PROTECTED] http://www.fuseware.com -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 9:48 AM To: [EMAIL PROTECTED] Subject: RE: How to stop an infinite CF loop? Actually, this was the first time this has happened with this tag. We renamed the tag and solved the problem. I'm just looking for a possible way of stopping a similar situation in the future. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Fred T. Sanders [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 4:12 AM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? have you isolated the tag? If so why not just fix it. -- -- -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
Try this: cfset x = gettickcount() cfloop from=1 to=1000 index="variable.counter" cfset y = gettickcount() cfif ((y - x) GT 1) !--- Inside a Tag you can use cfexit --- cfabort showerror="#variable.counter#" /cfif /cfloop Cheers, Duane Boudreau, Project/Beta Manager, eMPower Director, Web Technologies Ektron, Inc. http://www.ektron.com 5 Northern Blvd, Suite 6 Amherst, NH 03031 Tel: 603-594-0249 Fax: 603-594-0258 -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 9:48 AM To: [EMAIL PROTECTED] Subject: RE: How to stop an infinite CF loop? Actually, this was the first time this has happened with this tag. We renamed the tag and solved the problem. I'm just looking for a possible way of stopping a similar situation in the future. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -Original Message- From: Fred T. Sanders [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2000 4:12 AM To: [EMAIL PROTECTED] Subject: Re: How to stop an infinite CF loop? have you isolated the tag? If so why not just fix it. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf _talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: How to stop an infinite CF loop?
I think that's a given. But I think what he was wanting to know is ... once you discover an infinite loop is running, what can you do to stop it other than restart the server? Which seems like a sound thing to want to know. It would be pretty obvious that if you don't discover an infinite loop while you're writing the routine, the next most likely time to discover it is when it runs. What then? Cheers, Mike Kear AFP Web Development Windsor, NSW, Australia http://www.afp.zip.com.au On Mon, 19 Jun 2000, Fred T. Sanders wrote: have you isolated the tag? If so why not just fix it. - Original Message - From: "Lon Lentz" [EMAIL PROTECTED] To: "cftalk" [EMAIL PROTECTED] Sent: Monday, June 12, 2000 8:33 AM Subject: How to stop an infinite CF loop? I had posted this question, in a slightly more vague way, a couple weeks ago. Well, the theoretical happened and I was wondering if anyone might have a solution to head off such future occurrences. It seems that a no-longer-here developer had written a template where in when conditions were met, a custom tag was called, and an email was generated. He had named his custom tag the same as the calling template. Well, the conditions were finally met, and in the end, some poor woman got 116,000 emails. So, with an example this time, is there a straight forward way of shutting this loop down? Possibly a way of setting up a template to do it? Someway other than shutting the service down? We ended up having to kill the service to stop it. We initially tried making changes to the template hoping to force it to error out...but the system had cached all of the pertinent information and was on cruise control. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=li sts/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=li sts/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: How to stop an infinite CF loop?
I think that's a given. But I think what he was wanting to know is ... once you discover an infinite loop is running, what can you do to stop it other than restart the server? Which seems like a sound thing to want to know. It would be pretty obvious that if you don't discover an infinite loop while you're writing the routine, the next most likely time to discover it is when it runs. What then? That's not such a simple question. How is the CF server supposed to differentiate between a finite loop and an infinite loop? Is 1000 iterations too many? 10,000? 100,000? I'm sure there are valid processes that could loop that many times and still have a definite exit point. The only way for CF to tell what loops are infinite would be to examine the loop logic and decide if the exit state would ever be met. Considering that this could be incredibly difficult (or impossible) for even marginally complex loops I don't see how this could be efficiently included in the CF engine. The best solution is to hire programmers that don't write infinite loops g. Regards, Seth Petry-Johnson Argo Enterprise and Associates -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
It seems that a no-longer-here developer had written a template where in when conditions were met, a custom tag was called, and an email was generated. He had named his custom tag the same as the calling template. Well, the conditions were finally met, and in the end, some poor woman got 116,000 emails. So, with an example this time, is there a straight forward way of shutting this loop down? Possibly a way of setting up a template to do it? Someway other than shutting the service down? We ended up having to kill the service to stop it. We initially tried making changes to the template hoping to force it to error out...but the system had cached all of the pertinent information and was on cruise control. One suggestion I've heard is to use ClusterCats (requires CF Enterprise), even on 1 machine, to monitor the service and restart it if it consumes X% CPU for X amount of time. Just a thought... -Ron -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: How to stop an infinite CF loop?
Look at using CFBREAK in a conditional loop. You can find it's use in a loop on page 887 of the CF Web Application Const. Kit, Second Edition by Forta. -Original Message- From: Lon Lentz [mailto:[EMAIL PROTECTED]] Sent: Monday, June 12, 2000 8:34 AM To: cftalk Subject: How to stop an infinite CF loop? I had posted this question, in a slightly more vague way, a couple weeks ago. Well, the theoretical happened and I was wondering if anyone might have a solution to head off such future occurrences. It seems that a no-longer-here developer had written a template where in when conditions were met, a custom tag was called, and an email was generated. He had named his custom tag the same as the calling template. Well, the conditions were finally met, and in the end, some poor woman got 116,000 emails. So, with an example this time, is there a straight forward way of shutting this loop down? Possibly a way of setting up a template to do it? Someway other than shutting the service down? We ended up having to kill the service to stop it. We initially tried making changes to the template hoping to force it to error out...but the system had cached all of the pertinent information and was on cruise control. Lon Lentz Applications Developer - GetLists.Com DataWarehousing and List Sales - Market your lists on the Net! [EMAIL PROTECTED] 941-541-9000 Ext. 210 -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.