Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cold Fusion Session Timing Out

Posted on 2016-08-26
11
Medium Priority
?
111 Views
Last Modified: 2016-08-29
I have an application that I am inheriting that keeps timing out.  I know there is a setting in the administration panel under Memory Variables that I set to 8 hours.  I also thought that I made the right changes to the application.cfm file by setting this:   SESSIONTIMEOUT="#CreateTimeSpan(0, 8, 0, 0)#".  I am still getting complaints that the application is timing out after sitting for a little bit.  I am using Cold Fusion 10 and the application is not of the sort that it isn't okay for the session to stay open for the period of a work day.  What have I missed or have I not set properly?  There are the following lines in my the application code, but I am not sure that they should be changed:

<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <cfset APPLICATION.pscdba_ConnectionString = "DSN=FICIPDSNConn;UID=sa;SERVER=FacilityInventory;">
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.ADMIN_ROLE = "PSCP_ADMIN">
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_UID = "dbo">
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_ConnectionTimeOut = 1005>
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_CommandTimeOut = 1005>
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_CursorLocation = 3>
</CFLOCK>
 
Any help would be greatly appreciated.
0
Comment
Question by:mounty95
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 25

Expert Comment

by:dgrafx
ID: 41772647
Notice that the code you posted is Application var code and doesn't have anything to do with session timeout.
Post entire code block that has to do with session also application name.  Post entire file if you'd like - removing any security info.

Do you have subfolders with an Application file in?
If yes then post those files too.
0
 

Author Comment

by:mounty95
ID: 41773000
I do not have any subfolders with an application file in it.  Here is the entire code for the application.cfm file in the root folder of the application:

<CFAPPLICATION NAME="MyApp"
   SESSIONMANAGEMENT="yes"
   SETCLIENTCOOKIES="Yes"
   SESSIONTIMEOUT="#CreateTimeSpan(0, 8, 0, 0)#"
   APPLICATIONTIMEOUT="#CreateTimeSpan(0, 8, 0, 0)#"
   CLIENTMANAGEMENT="Yes"
   CLIENTSTORAGE="Registry">
   
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <cfset APPLICATION.pscdba_ConnectionString = "DSN=FICIPDSNConn;UID=sa;SERVER=FacilityInventory;">
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.ADMIN_ROLE = "PSCP_ADMIN">
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_UID = "dbo">
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_ConnectionTimeOut = 1005>
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_CommandTimeOut = 1005>
</CFLOCK>
<CFLOCK scope="APPLICATION" type="EXCLUSIVE" TIMEOUT="480">
      <CFSET APPLICATION.pscdba_CursorLocation = 3>
</CFLOCK>
0
 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 41773055
what you have chosen as sessionStorage in you cfapplication tag.

Another thing is when you are setting up your session scope, making a hidden ajax call which runs at an interval of 1 hour till 8 hours to check if the session is timed out or not, if yes, just call a file to fetch the session stuff. [make sure you store the individual session in database table called as sessionstorage]

Hope that makes sense
0
Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

 
LVL 25

Expert Comment

by:dgrafx
ID: 41773120
You cannot set a time-out value for SESSIONTIMEOUT that is greater than the maximum session time-out value set on the Administrator Memory Variables page so check what it's set to - must be >= 8 hours.
1
 

Author Comment

by:mounty95
ID: 41774629
Here is a screen shot of my Administrator page for Memory Variables.  I thought that by setting the Session and Application Variables to 8 hours, I had that corresponding with the 8 hours set in the application.cfm file.
CF-Admin.JPG
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 2000 total points
ID: 41774960
Look at your session cookie setting!!!
WHO the heck set that to 60 minutes???!!!???

A sure bet that is the culprit ...
Set it to 15768000 (that's over 1500 weeks)
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 41774966
BTW - change your Application timeout to 2 days - no reason to timeout the application so soon.
This has nothing to do with your problem however - just a tip ...

Good luck!
0
 

Author Comment

by:mounty95
ID: 41774985
Ok changed the Session Cookie Setting to 15768000.  Will see how that effects things.

And when you suggest changing the application timeout to 2 days are you referring to the application.cfm file or are you referring to the Application Variables in both the Maximum and Default Timeout sections of the Memory Variables of the Administration?
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 41775049
By default Application vars in the CF Admin are set to 2 days for both maximum and default. BTW session maximum is set to 2 days also.
You can really remove the ApplicationTimeout setting in your Application file. Application settings are meant to last and not timeout (so just let it use the default of 2 days from the administrator) - unlike sessions which are meant to timeout because each user creates a session. There is only one application though.
0
 

Author Closing Comment

by:mounty95
ID: 41775487
Thank you very much for helping with this solution.  I think I finally have it fixed.  Thank you also for the additional information.
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 41775507
Glad I could help
Good way to start off the week
0

Featured Post

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question