I am running into a deadlocking issue on CF5, and I was wondering if anyone
here had any advice or knew of any good resources for fixing it.
The following code is timing out trying to obtain an exclusive lock on the
application scope:
<cfsilent>
<cflock scope="application" type="readOnly" timeout="10">
<cfif NOT isdefined("application.opportunity_info")>
<cfset needs_init = 1>
</cfif>
</cflock>
<cfif needs_init eq 1>
<cfset temp = structNew()>
<cfinclude template="qry_get_phoenix_count.cfm">
<cfinclude template="qry_match.cfm">
<cfinclude template="qry_opportunity_list.cfm">
<cfinclude template="act_build_opportunity_match_data.cfm">
<cflock name="data_0" throwontimeout="Yes" timeout="10"
type="EXCLUSIVE">
<cfset application.opportunity_info =
duplicate(temp)>
<cfif structKeyExists(application.data_refresh,
"opportunity_info")>
<cfset
application.data_refresh["opportunity_info"] = now()>
<cfelse>
<cfset temp =
structInsert(application.data_refresh, "opportunity_info", "")>
<cfset
application.data_refresh["opportunity_info"] = now()>
</cfif>
</cflock>
<cfset needs_init = 0>
</cfif>
</cfsilent>
In this case, a structure called temp is being built in the template
act_build_opportunity_match_data.cfm, and then being written into the
application scope. As I said, the template is timing out waiting to obtain
an exclusive lock.
I have 14 other structures being built almost identically.
Any advice would be appreciated,
Thanks,
M
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4