Hah, that's cool. I'd say it depends on how long you expect your database to
be down for, what DBMS you're using, how important the data is, how long the
user will wait for their data, and so on and so on. In other words, it
depends.

Generally speaking, you should never have to retry a query. It should just
work. Applications that rely on database tend to work best when the database
works.

If you're using MS Access as your database, that's your problem right there.

If you have a real database (aka not MS Access), discuss the problem with
your DBA. If you are the DBA, maybe we can help you debug your database
problem here on cf-talk.

To throw out an absolutely arbitrary figure, don't try it 3 times.

This reminds me of this time we had SQL failover for a buggy server, when
one server goes down, the database cluster would be unavailable for a few
seconds while we wait for the other server. I had this idea of a whole
annoying database running framework to automatically retry a given number of
tries, if a few queries fail in a row across the site, we'll throw up a
friendly under construction type message instead of the data they were
looking for, meanwhile, it kicks off a job to retry the connection, and once
it connects successfully, turns maintenance mode off and stops the job. I
never got the chance to do it, which is too bad, it would have been fun.

nathan strutz
[Blog and Family @ http://www.dopefly.com/]
[AZCFUG Manager @ http://www.azcfug.org/]



On Thu, Apr 2, 2009 at 1:46 PM, Byte Me <byteme...@verizon.net> wrote:

>
> Is there a rule of thumb on how many times a query should be retried? I'm
> using nested cftry/catch and will retry a maximum of 4 times. Each retry is
> delayed by a random number of milliseconds. Thanks for any insight.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321269
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to