This content has been marked as final. Show 7 replies
When you specify sessiontimeout="#CreateTimeSpan(20,0,0,0)#" you imply that, when a visitor opens a page on your site and goes away, he may resume the session when he returns 20 days later. Is that what your intention is?
The attributes, applicationtimeout and sessiontimeout, are not specifications to determine how long application and session vars will live. They are, respectively, the time after which Coldfusion will time the application or session out, if it has been inactive. That is why the default sessiontimeout value is usually 20 minutes and the default applicationtimeout 2 days. With sessiontimeout="#CreateTimeSpan(0,0,30,0)#", the user's session can last for 20 days, or 20 months or 20 years for that matter, so long as there is never a gap of more than 30 minutes when he doesn't interact with the application.
The maximum values of applicationtimeout and sessiontimeout that are allowed in cfapplication tags are set in the Coldfusion Administrator. The default is 2 days(for applicationtimeout as well as for sessiontimeout). If the value you set in cfapplication is higher, you will not get an error. Coldfusion will just use the Administrator's maximum value. That is likely why your sessions held for 2 days rather than 20 days.
The CF server has a max timeout setting that limits what you can set in the <cfapplication> tag. In order to increase the timeout period, you would have to change that too.
Yes: I need the application vars and session vars to last 20 days.
Yes: the server admin max is 35 days and the min(default) is 10 days.
So I would assume that these would stick around for 20 days. It worked fine before I switched to virtual directories in our CMS.
I do have an application tag in the share which should grab the apps name so the share knows which app to be for any one user.
I was wondering if there was a known issue with session/application variables and virtual directories.
the server admin max is 35 days
What do you mean by that? What values have you set in the Coldfusion Administrator for:
a) the maximum values of applicationtimeout and sessiontimeout;
b) the default values of applicationtimeout and sessiontimeout?
Cut & Pasted from the CF Admin:
Enable Application Variable:checked
Enable Session Variables; checked
Application Variables 35 days 0hours 5mins 0secs
Session Variables 35d ays 0hours 5mins 0secs
These values specify the time-out period that ColdFusion MX uses if you do not specify an application-specific value in the cfapplication tag.
Application Variables 10 days 0hours 5mins 0secs
Session Variables 10 days 0hours 5mins 0secs
Hope that makes it clearer..
Thanks for your patience!
Put both the sessiontimeout attribute and the applicationtimeout attribute in the cfapplication tag. Give applicationtimeout a value greater than that of sessiontimeout.
Putting both the sessiontimeout and the applicationtimeout in the application cfm seemed to have done it. 5 days later and still had my sessions sticking until they disappeared again.
Eventually found out that my Hosting Co. has been applying patches and rebooting the Server at night/early morning.
so, I think we are good to go now. I'll have to keep an eye on my sessions and my host!