#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    84
    Rep Power
    10

    Application scope losing variables


    My app is setup to email me the details of any runtime errors when they occur. Additionally, on every request, my controller looks for an updated config.xml (by file modified date) to refresh certain application variables should the data in that xml file change. All requests to my application go through the controller.

    The problem I'm seeing is some of my scheduled tasks are failing. The error being reported is that the expected application scope variables do not exist -- which should not be possible because the controller initializes them if they don't exist before processing the request. My application is also set to send me an email on the first request it receives after the server has been started (allowing me to track unexpected reboots and server restarts). I am not receiving these emails so I can conclude that the server is not restarting unexpectedly.

    Any ideas why my application variables would be getting cleared without the server restarting? I have no code in place to clear these variables -- only code to set them.
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,278
    Rep Power
    968
    Application variables also have a time out, either set in the Application.cfc/.cfm, or whatever is set in the CF administrator.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    84
    Rep Power
    10
    Yeah, I've considered the timeout. But I have it set to 7 days in the console and 1 day in Application.cfm. I see these errors pop up a couple of times per day.

    Additionally, this only started happening after I migrated my system to a Windows Server 2008 machine.
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,278
    Rep Power
    968
    Not sure then. Which version of CF are you on? My guess is that it must be something in either your initialization logic, the order things are happening, a race condition, or a server config issue.

    Comments on this post

    • rawk agrees
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    84
    Rep Power
    10
    I'm actually using Open BlueDragon, so it could very well be a bug in the build I'm using. I posted it to their google group, so I was mostly hoping someone here might suggest something simple that I'm overlooking. Thanks for your input.

IMN logo majestic logo threadwatch logo seochat tools logo