Solved

Cold Fusion Session Timing Out

Posted on 2016-08-26
11
90 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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 500 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

752 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