• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

session/ application timeouts

Explorer ,
Jun 19, 2006 Jun 19, 2006

Copy link to clipboard

Copied

Is anyone aware of an application or session variable problem using virtual directoies in IIS win2003
I have 10 portals(/p1,p2,p3,p4...Pn) that share a main Directory (MD) as a virtual directory.
it looks like this to the world;
example.com/P1/md
P1 has an application.cfm
MD's application.cfm looks like this:

<cfset ds=ucase(listgetat(cgi.PATH_INFO,1,"/"))>
<CFAPPLICATION NAME="#ds#" CLIENTMANAGEMENT="Yes" SESSIONMANAGEMENT="Yes" SETCLIENTCOOKIES="Yes"
sessiontimeout="#CreateTimeSpan(20,0,0,0)#">

where PATH_INFO=/P1/MD/index.cfm

Anybody see a problem with this?
I need the application vars and session vars to last 20 days.
the server max is 35 days and the min is 10 days.
It seems that they hold for maybe 2 days. Is it my code or a virtual directory thing?

~J
TOPICS
Advanced techniques

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 28, 2006 Jun 28, 2006
BKBK,
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!

Jeff

Votes

Translate

Translate
Community Expert ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

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.




Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

Thanks Guys
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.

~J

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

Cut & Pasted from the CF Admin:

Enable Application Variable:checked
Enable Session Variables; checked

Maximum Timeout
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.

Default Timeout
Application Variables 10 days 0hours 5mins 0secs
Session Variables 10 days 0hours 5mins 0secs

Hope that makes it clearer..

Thanks for your patience!

~J

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

Put both the sessiontimeout attribute and the applicationtimeout attribute in the cfapplication tag. Give applicationtimeout a value greater than that of sessiontimeout.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 28, 2006 Jun 28, 2006

Copy link to clipboard

Copied

LATEST
BKBK,
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!

Jeff

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation