If you are comfortable with this assumption, that's your own assessment
of risk.  However, I recommend setting up a server-scoped CFLOCK to act
as a mutex. This way only 1 http request can run with this at any given
time. Make CFLOCK requests time out after 10 seconds or so with a
THROWONTIMEOUT.  Then you can protect this problem from ever occurring,
on purpose or by accident.


One particular concern I have is using stuff like this in the cf
scheduler.  Then they could be running very slowly, the script called at
some fixed interval.  This might cause overlapping instances, and
eventually bring down the server.  With the CFLOCK in place, this is not
possible.


My $0.02


dbk

  _____  

From: Ryan Duckworth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 6:10 PM
To: CF-Talk
Subject: RE: Java sleep method ties up no resources?

I personally have used this sleep method and looped over a query w/
100,000 records, calling sleep for each record to slow it down.  No one
would ever call this same page from 10 different browsers.  There would
be no point and yes you would deserve to have your server crash on you.
You would still have 9 available even with this batch process that you
want to run over a period of time... i.e. over night or one hour.

Ryan Duckworth
Macromedia ColdFusion Certified Professional
Uhlig Communications
10983 Granada Lane
Overland Park, KS 66211
(913) 754-4272

  _____  

From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 4:52 PM
To: CF-Talk
Subject: Re: Java sleep method ties up no resources?

Thanks guys.  I figured this was way too good to be true.  

--
--Matt Robertson--
MSB Designs, Inc.
mysecretbase.com
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to