Can CFThread, when wrapping over cfhttp, solves my Timeout error issue?

245 Views Asked by At

My application pulls lots of data from different applications according to the selected scopes. For e.g. Org level and SubOrg level scopes, this can cause to bring server down and everyday causes server crashing and timeouts. So I wanted to know whether wrapping cfthread around my cfhttp will solve my timeout problem?

<cfinclude template="fundedScopes.cfm">

<!--- Call the funded scopes --->
<cfset dynVarName = "funded" & bizforShort>
<cfif structKeyExists(variables,dynVarName)>
    <cfset howManyCustomScopes = listLen(structkeylist(variables[dynVarName],"|" ),"|" )>
    <cfmodule template="#Request.Library.CustomTags.VirtualPath#Scheduler_LogDetail.cfm"
                  Step="Funded Level Cache" Detail="Custom Scopes to be cached: #howManyCustomScopes#"
                  LogData=""></cfmodule>
    <cfloop collection="#variables[dynVarName]#" item="t">
        <cfset tempurl = variables[dynVarName][t]["url"]>
        <cfset tempurl = tempurl & "&retainCache=1">
        <cfoutput>
            <cfhttp url="#tempurl#" method="GET" resolveurl="false" timeout="3000">
            #tempurl#<br>
            <cfset scopesCachedCounter = scopesCachedCounter + 1>
            <cfmodule template="#Request.Library.CustomTags.VirtualPath#Scheduler_LogDetail.cfm" Step="Funded Scopes Cache" Detail="#scopesCachedCounter#.- #t#" LogData="#tempurl#"></cfmodule>
        </cfoutput>
    </cfloop>
</cfif>
0

There are 0 best solutions below