- May 8, 2009 1:29 PM
-
ColdFusion
I first got this error a few weeks back, and when it showed up again this week, I thought I should look into it and see how this could be happening, and I thought that I'd post the results here so that it might aid the next person trying to stitch together the details.
The first thing you'll probably stumble across when googling for this issue is Session Is Invalid Bug (and Fix) by Ray Camden, which points you to this post by Brandon Purcell that that then points you to this Tech Note from Adobe that explains that this happens when you are running J2EE session values and your J2EE session times out before your ColdFusion session times out. This really makes a lot of sense even if the ntoes are out of date (CF 6), but the story's not quite so simple.
The Problem
My application already has a timeout of 20 minutes, so the 30 minute J2EE window shouldn't be a problem. A little more googling brought me
this post on Just Skins by bert.d that says he was still getting error messages with a CF timeout less than that of the J2EE timeout. That sounds a lot like my problem, so more googling, since this didn't provide an answer. I finally found more info
at Nabble where a user said to check not only your application's timeout, but your CF Server setting for the
maximum session timeout. Sure enough, this was still set to 2 hours on my server, so I cranked it down to 21 minutes, and I hope that resolves this issue.
The Solution
If you are having problems with "Session is Invalid" errors, your J2EE sessions are timing out before your CF sessions are timing out. You have two options: extend the J2EE sessions as described in the Tech Note, or tighten your CF session timeouts in the CF Administrator. It doesn't appear to matter what your application timeouts are set for in this case.
Comments