Title: CF ODBC to unresponsive SQLServer, and fine-tuning ODBC data-sources

I'm having problems with my CF server in that it keeps hanging - not processing any CF pages at all.  However, the Task Manager reports an Idle CPU of 98%.

I have narrowed the problem down to another server that I retrieve patient endoscopy results from, stored in SQLServer7.  Sometimes this server becomes completely unresponsive and has to be re-booted, and somehow this in turn causes my CF server to stop processing .cfm pages.  I know this is an on-going problem, so I put some error trapping in my program, such that:

<CFSET db_endoscopy_error = false>
<CFTRY>
       <!--- Get the list of reports for the patient --->
       <CFQUERY NAME="Get_Pt_Endo" DATASOURCE="#Request.DSN#">
       SELECT        ReportNo,
                           VersionNo
       FROM                 Reports
       WHERE         Patient = '#URL.id#'
       </CFQUERY>

       <CFCATCH TYPE="Database">
              <CFSET db_endoscopy_error = true>
       </CFCATCH>
</CFTRY>

<CFIF db_endoscopy_error>
       Sorry, database is down
<CFELSE>
       Show the results
</CFIF>

This seems to work if SQL Server is STOPPED on the server, but does NOT work if the whole Endoscopy server is unavailable.  Is there something else I should be checking for?  I thought, based on the CF ODBC settings below, it would try, fail after 5 seconds, and then report an error.

The settings I have in CF5 for Endoscopy are:

Login timeout:    5          does this mean timeout if can't login in 5 seconds?

Limit connections:  not ticked

Maintain database connections: ticked

Connection timeout: 20 minutes

I'm also a bit unsure as to whether these settings are optimum.  Basically, the server only get's about 100 queries a day, and each only ever returns 1 or 2 records.  So any advice on ODBC setup in CF would be appreciated.

Thanks

Karl O'Sullivan

Reply via email to