My app sets the session timeout to 30 minutes. In a couple of programs, I need to extend this to 4 hours in order to wait for a COM call that may take more than 30 minutes to complete.
In ACF I used the undocumented session.setMaxInactiveInterval(), but this does not appear to work in Lucee.
Is there a way to accomplish this in Lucee and avoid the session terminating before the COM call completes?
It is indeed a big waste of resources. Search bots make a lot of visits to our servers, and in ACF, we can reduce their session TTL to 3 minutes, but allow logged in users to have much longer sessions.
We also rely heavily on setMaxInactiveInterval() in ACF to set sessions that are created by bots down to a couple of minutes, and actual user sessions much longer.
but this doesn’t seem to change anything in getApplicationMetadata() - but perhaps I’m looking in the wrong place?
I accept that Ben Nadel’s solution probably works, but I don’t want to have to have a special url variable on every page for the long-session users. With the idea that it might be possible to actually have swapable timeouts stored as a session variable which could be altered once the user had logged in, I tried this, the new session.customTimeout value is written to session, but nothing seems to be changing in getApplicationMetadata()
I’m not sure about getApplicationMetadata() results relative to this function.
I used GetPageContext().getSession().getMaxInactiveInterval() to validate the setting. I’m fairly certain that I validated the session lasting longer than the time set in the application.cfc, but I don’t exactly remember how I did that.
I also use the following code to “shutdown” scheduled tasks: