Solved

Cold Fusion Session Timing Out

Posted on 2016-08-26
11
69 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 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cfchart issue with html 6 123
cfspreadsheet 15 100
Update cached table in H2 database 6 56
Coldusion - DATA insert syntax problem 12 34
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

777 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