session.setMaxInactiveInterval() in Lucee?

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?

Thanks.

We have the same problem. Did you find a solution by a chance? Thanks.

No, unfortunately. For Lucee installs, I have to raise the session timeout. It’s a waste of resources, but I couldn’t find any alternative.

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.

If you can identify the session you want to terminate early, then the following might be helpful:

Ben Nadel, Explicitly Ending A ColdFusion Session

There seems to be a method with that name available via the page context. Perhaps worth trying to see if it does what you want:

GetPageContext().getSession().setMaxInactiveInterval( 14400 );

Otherwise as the post Bill referred to says, you can vary session timeouts per request based on a flag/identifier of some kind.

Julian, thanks I’ll give it a try.