Good answer. So essentially Nagios will calmly stop the processing of your cf app? By stop I mean it will set a flag somwehere (app scope, etc) which tells your site to degrade?
Sounds interesting but not sure if I would nix my cftry/catches. Let's look at another scenario. You have a cfquery that executes a sproc (stored procedure) on your db. A change is made to the sproc that unknowingly affects this lonely cfquery tucked in a corner somewhere. How do you manage this potential error from happening? Sometimes things happen and people forget to make certain updates to necessary templates. It just happens. How does your app degrade here? BTW, I guess I meant Dave but said Brad in my other post. On 2/15/06, Dave Carabetta <[EMAIL PROTECTED]> wrote: > > On 2/15/06, John C. Bland II <[EMAIL PROTECTED]> wrote: > > So, in the case of a simple query what happens if your datasource can't > > connect? (db down, etc) How do you handle this error with an open > cfquery? > > onError in App.cfc? > > > > Just curious... > > > > Well, like I said, if you can't connect to your database at all, then > you have bigger problems than whether or not a particular code snippet > works. This is where test probes should be written specifically to > ping your database every so often. We have a test set up using Nagios > that runs a probe that just hits our database every 15 seconds via a > ColdFusion page. We use Oracle, so the query is literally just: > > SELECT > sysdate > FROM > dual > > If that returns without issue, then all's fine. If our test page > doesn't return with the expected string (I won't reveal ours for > security reasons), then we know something's up and Nagios sends up the > appropriate alerts. > > Remember that try/catch is at the code level for specific bits of > logic that you can reasonably forecast might not execute correctly for > a given reason. You need to have layers above your code base that run > the appropriate system checks to make sure things are up and running. > Using Nagios (which is an open source host, service and network > monitoring program, by the way) should be where you do your system > health checks over systems that you control. > > Hope this helps? > > Regards, > Dave. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232365 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

