Dave, ><cfset Request.AppGlobal = duplicate(application.global) > > >Immediately after this, we have a <CFIF request.appglobal.xxxx> line of >code which is checking on the value of one of the global variables which >are now supposed to be available in the request.appglobal scope. However, >about 1/2 of 1 percent of the time, this line of code fails with the >variable not being found in the request scope. It appears that apparently, >the line that duplicates the application.global scope into the >request.appglobal scope is failing to do its job properly and therefore on >the next line, the request scope variable doesn't exist so BAM. >
This sounds like a race condition--where you have a 2nd template re-running your application initialization code. For example: 1: <cfset application.complex = structNew() /> 2: <cfset application.complex.key1 = "some value" /> 3: <cfset application.complex.key2 = "some value" /> 4: <cfset request.app = duplicate(application) /> 5: 6: <cfoutput>#application.complex.key2#</cfoutput> In the above code, it's possible for line 6 to generate an error if a 2nd template has already processed line 1, but has not processed line 3. In a case like this, you need to have an exclusive lock around line's 1-4 and a read lock on line 6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257008 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

