Zac, your idea is interesting, but the short timeout would not be helpful. The lock timeout only says how long a contending lock request would be willing to wait. In the case Matthew describes, if he was going to use a lock to prevent concurrent execution of the code, he'd really want a very long lock, to preclude other requests trying to execute it.
But it really wouldn't be the solution to the problem, as now the request threads would tie up with people waiting on the lock. :-) No, what's really needed is to stop the long-running pages (the web service being called, assuming as I asserted in the last note that these are running on the same server that's calling them.) That's down to determining what they're doing that's taking so long. And while I wanted to say this in reply to Matthew's other thread, I don't want you guys seeing 4 messages from me popping up, so I'll say it here: Matthew, it would seem one solution for you (assuming you can't control how long the called web service takes to run) would be to cache the web service result so that you don't call it so often. There's no built-in support for caching web service calls (like we have with CFQUERY), but it's easy enough to save it into a shared scope (session, application, or server, depending on the nature of the data being returned and how you use it), and write some code that watches for when to refresh or purge the cached result. Not trivial, but perhaps the idea is enough to get you started. If not, let us know other challenges that preclude it. /charlie -----Original Message----- From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf Of Zac Spitzer Sent: Tuesday, January 06, 2009 4:27 AM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Timeout not working on CFINVOKE? there's nothing funky that could be doe here using cfthread? try putting an exclusive lock around it with a short timeout ie 4s will stop other connections also getting stuck.. all depends on the app and scale... but if it keeps the app up... On Tue, Jan 6, 2009 at 5:36 PM, MrBuzzy <mrbu...@gmail.com> wrote: > Oh this old chestnut :) > > What you are doing is correct, but the timeout can not be enforced by > ColdFusion until AFTER the external net connection has completed. > > I realise I'm not describing it very well. Basically it's an inherrent > problem with the java class that handles http connections. ColdFusion can > not respond until the network connection 'gives back'. > > It can also occur with CFHTTP and others. > > If your service is genuninely 'hung' and gives nothing back, that connection > will remain open for a long time. Not even FusionReactor can kill it :) > > (I'm guessing the 60 second time out you are experiencing is on the web > service itself). > > On Tue, Jan 6, 2009 at 4:57 PM, Matthew <matthewbchamb...@gmail.com> wrote: >> >> Hi all >> >> I'm using CFINVOKE to make a web service call and I've added the >> timeout attribute but it's not timing out. I've set it to 5 secounds >> and wrapped the block in a CFTIMER tag (to confirm the duration) but >> it's still hanging on for 60 seconds (I'm guessing the 60s is the >> default timeout setting in CF). I need to override the default timeout >> for this specific web service call only. Any ideas? >> >> <cftimer label="Web service call" type="inline"> >> <cfinvoke webservice="#WSDL#" method="doSearch" >> returnvariable="SearchResult" timeout="5"> >> <cfinvokeargument name="in0" value="foo" /> >> </cfinvoke> >> </cftimer> >> >> Cheers >> Matthew > > > > > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---