Unresolved
Details
Assignee
Michael OffnerMichael OffnerReporter
CKCKPriority
MajorFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
CK
CKPriority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 16 January 2017 at 00:31
Updated 1 July 2021 at 14:29
Sometimes, OnApplicationStart is not called, resulting in an uninitialized application scope containing just the application name and nothing else.
I believe this is related to the application timing out before the session.
What appears to happen is the application times out and calls onApplicationEnd() and provides the application scope to onApplicationEnd(). All good so far.
Then the session expires and onSessionEnd() is called and it has the session scope passed in correctly. The real application scope is already gone though and Lucee appears to create a new application scope to pass into onSessionEnd().
Then on the next request to the site, the uninitialized application scope exists so onApplicationStart() isn't run and everything is totally broken.
I have captured this in the included log file.
The situation unfolds like this:
Setup: Go to site where application timeout is AT LEAST one minute less than session timeout (it seems Lucee only cleans up sessions and applications once per minute). Then wait.
Log Line 2: Application times out - All the stuff I put in application scope present
Log line 3: Session times out - New uninitialized application scope provided
Log line 4: Session times out continued - All session variables provided correctly
In between now and next log line: Site is broken - application scope empty other than applicationName. My code fails in onRequestStart() because its looking for application variables.
Log line 5: Uninitialized application times out
Afterward - Everything good, new application will be created and initialized properly on next request
This issue has happened for a while in Lucee. Not sure when I first noticed it as I just thought it was a bug in my code.