Solved

Cold Fusion Session Timing Out

Posted on 2016-08-26
11
59 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 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 15

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
 
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
3 Use Cases for Connected Systems

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

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Renaming file after uploading in Coldfusion 4 220
Airline check in kiosk 4 99
cfchart display 12 97
ColdFusion - Import large XLS files 4 67
The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
A short film showing how OnPage and Connectwise integration works.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

14 Experts available now in Live!

Get 1:1 Help Now