Copy link to clipboard
Copied
Copy link to clipboard
Copied
Did you find out any solution to resolve this issue? I am also facing similar type of issue.
Thanks
Anbu
Copy link to clipboard
Copied
Are you trying to CHANGE the request time out or have it delay for a certain period of time?
The cfsetting just changes the request time out ie allows the page to wait longer for it to load before throwing a timeout error.
Copy link to clipboard
Copied
In a CFC, all the code must be within the <cfcomponent> tags. This is perhaps not immediately clear in the docs.
--
Adam
Copy link to clipboard
Copied
Hi Adam,
Thanks for your response. I just want to throw the CFC an timeout error if it takes longer time. I have a CFC which runs very long and it hangs up the server. So I want the CFC to throw an timeout or error at some short interval.
Please help me out in resolving this issue.
Copy link to clipboard
Copied
Read the sample code in the first post. Then read Adam's first sentence. Then look at the sample code again. Anything jump out at you?
Copy link to clipboard
Copied
adding CFC timeout?
No, I wouldn't. When my employer sends me to get a job done, he is the one with the stop-watch in his hand, not me.
In my opinion, the calling page should be the one to decide that a function is taking too long, not the component. I would design it like this:
callingPage.cfm
=============
<cfsetting requesttimeout="30" />
<!--- instantiate component or web service and call test() --->
Copy link to clipboard
Copied
This is a good point. The only time I would vary this advise is if the CFC method was being called directly / remotely.
--
Adam