The query timeout is not designed to work when there is no connection at all to the DB server. It is designed to time the statement - so if the connection itself is lost the setting will not have any affect. In affect you have an orphaned thread out there that is taking up space in the running request queue.
The big question is why do you lose connection? Networking? Overloaded SQL server? That's where you need to focus I think. -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -----Original Message----- From: Sung Woo [mailto:[email protected]] Sent: Wednesday, April 15, 2009 7:58 AM To: cf-talk Subject: Re: CFQUERY Timeout for SQL2005 Fails Anyone? Bueller? I really need an answer to this -- even though I'm running Fusion Reactor and can keep a survival strategy, this is no way to keep a server running. Is there anyone out there who's successfully used the TIMEOUT parameter in CFQUERY with CFMX 7.0.2 and SQL 2005 Standard? > Hi Casey, > > What happened today is that the SQL server basically locked up. CF > kept waiting for the request to come back, but it never did because it > just hung infinititely. It seems as if CF waits forever in a case > like this, so it's vital that I can kill the connection from the > CFQUERY. > > The real query I run returns usually within milliseconds, about 75ms > at most. So this is something that is out of the ordinary, but I want > to prevent it from happening in the future. Is there a way? Thanks. > > > >how about adding WITH (NOLOCK) > > > >If your queries are just selecting data, i'd use WITH (NOLOCK) > > > >that way you don't need to wait for transactions to finish if that > table > >gets heavy inserts > > > > > ><cfquery name="test" datasource="dsn" timeout="1"> > >> select top 20000 * WITH (NOLOCK) > >> from table > >> </cfquery> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:321608 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

