we have a long running cfm (> 40 minutes) and an application timeout of 30 minutes. During the run of the cfm the session expires and all variables are removed from the session variable. Is this the expected behaviour?
See this sample code (can be testet by using an application timeout of one 1 minute)
<cfsetting requesttimeout="600">
<cfscript>
session["key"] = "value";
writeDump(var=sessionstartTime(), label="Starttime-1");
writeDump(var=session.hashCode(), label="Hashcode-1");
writeDump(var=session["key"], label="Key-1");
sleep(120 * 1000);
writeDump(var=sessionstartTime(), label="Starttime-2");
writeDump(var=session.hashCode(), label="Hashcode-2");
writeDump(var=session["key"], label="Key-2"); //<---This line throws the exception with the message: key [key] doesn't exist (existing keys:)
</cfscript>
Weird thing: the session startTime and hashcode of the session object is the same,
Thanks for clarification and a great start in 2021!
Michael
i think there’s a tomcat option org.apache.catalina.session.StandardSession.ACTIVITY_CHECK to check for an active session request before expiring it, but I don’t think lucee enables that