Solved

Cold Fusion Session Timing Out

Posted on 2016-08-26
11
53 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
  • 6
  • 4
11 Comments
 
LVL 24

Expert Comment

by:dgrafx
Comment Utility
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
Comment Utility
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 15

Expert Comment

by:myselfrandhawa
Comment Utility
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
 
LVL 24

Expert Comment

by:dgrafx
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 24

Accepted Solution

by:
dgrafx earned 500 total points
Comment Utility
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 24

Expert Comment

by:dgrafx
Comment Utility
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
Comment Utility
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 24

Expert Comment

by:dgrafx
Comment Utility
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
Comment Utility
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 24

Expert Comment

by:dgrafx
Comment Utility
Glad I could help
Good way to start off the week
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now