Is there any reason application variables would disappear before the
application timeout set in Application.cfm file?


I have the following code, which initializes an application based CFC if it
does not already exist.  I put in a cflog tag to let me know how often it
rebuilds itself and it seems to re-initialize every 1-2 hours, even though I
have the application timeout set to 12 hours in the cfapplication tag (and
the server timeout is still set to the default 2 days for application vars.)


<cfif NOT StructKeyExists(application, "SomeCFC") OR 0>
    <cflock name="CreateSomeCFC#application.ApplicationName#" timeout="10"
throwontimeout="Yes" type="Exclusive">
        <cfscript>
        // i create the SomeCFC
        application.SomeCFC=CreateObject("component", "SomeCFC").Init();
        </cfscript>
    </cflock>
    <!--- i update the SomeCFC log file --->
    <cflog text="SomeCFC initialized [#GetBaseTemplatePath()# ::
#cgi.Remote_Addr#]" file="SomeCFC">
</cfif>


The CFC contains a semi-boatload of configuration data, cached structs, etc;
but I've definitely worked with larger amounts of persistent data
before...could this be an issue?  Is there anyway to check how much is too
much with memory vars?  As usual, any help would be greatly appreciated->


Tyler S


PS: I'm also going to add another conditional statement within the lock to
re-check if the struct exists, I've just been forcing the re-init by
changing the 0 to a 1
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to