House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Session Variables Suddenly Stopped Working

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

Session Variables Suddenly Stopped Working

Thanks for the suggestion, Dave!  We'll give that a try. KeAnne Hoeg 06/03/2004 12:46 PM
----- Excess quoted text cut - see Original Post for more ----- Dave Carabetta 06/03/2004 12:34 PM
I did talk to the server admin, and she hadn't changed any of the settings KeAnne Hoeg 06/03/2004 12:05 PM
You may want to see if the CF Admin set strict locking validation otherwise; Semrau Steven Ctr SAF/IE 06/03/2004 11:45 AM
Sounds like a change was made from the CF Admin -- a change that now Jamie Jackson 06/03/2004 11:45 AM
Sounds like the server admins just turned on strict locking validation. Have Deanna Schneider 06/03/2004 11:37 AM
I played with some of the error handling and was able to get a little more KeAnne Hoeg 06/03/2004 11:16 AM
I inherited a site that uses session variables to track users' paths through the KeAnne Hoeg 06/03/2004 10:58 AM

06/03/2004 12:46 PM
Author: KeAnne Hoeg Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165432 Thanks for the suggestion, Dave!  We'll give that a try. ----- Excess quoted text cut - see Original Post for more -----
06/03/2004 12:34 PM
Author: Dave Carabetta Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165425 ----- Excess quoted text cut - see Original Post for more ----- KeAnne, I don't know the answer to your last question, but I'd like to make a recommendation, if I may, as to your current setup. The optimal setup with specific regard to your locking issue would be to enable the strict locking checkboxes in the CF Administrator in your *development* environment so as to force the developers to code better, and then disable the checkboxes in production. The enabling of the features results in a noticeable performance degradation, particularly under load. If you enable the options in your development environment, you force your team to code smarter and alleviate the need to for overhead in production. I use ColdFusion MX now, so I haven't had to worry about this in a while. But when I was on previous versions of CF, this approach resulted in noticeable benefits -- 1) your team codes smarter and more proactively, 2) your production site performance increases, and 3) proper locking will alleviate the chances of clashes and race conditions, which is why you're locking in the first place. Hope this helps. Regards, Dave.
06/03/2004 12:05 PM
Author: KeAnne Hoeg Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165411 I did talk to the server admin, and she hadn't changed any of the settings recently, but when I checked the CF Administrator on our test site (which works), I noticed that the locking information was set differently, so I changed the lock settings in the production CF Administrator from "Full Checking" to "No Automatic Checking", and that cleared up the problem because the code uses the name attribute instead of the scope attribute. What I find odd, however, is that this code and the production CF Admin server settings have not changed in 2 years, meaning that the production environment has been set to "Full Checking" for a long time, so why did it suddenly throw the error yesterday? ----- Excess quoted text cut - see Original Post for more -----
06/03/2004 11:45 AM
Author: Semrau Steven Ctr SAF/IE Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165406 You may want to see if the CF Admin set strict locking validation otherwise; I don't really see why you would throw that error off-hand (assuming you are on CF5?) however I would suggest some changes: <cfapplication name="solarcenter" sessionmanagement="Yes" clientmanagement="Yes" applicationtimeout="#createTimespan(0,0,90,0)#" sessiontimeout="#CreateTimespan(0,0,90,0)#"> Move the cfscript out of the application lock since you are dealing only with session variables and create a session lock around them <cflock timeout="5" throwontimeout="no" type="readonly" scope="session"> <!--- Log current user ---> <cfscript>   sUserInfo = StructNew();   sUserInfo.Address="#CGI.REMOTE_ADDR#";   sUserInfo.CFID="#session.cfid#";   sUserInfo.Token="#session.cftoken#";   sUserInfo.Address="#CGI.REMOTE_ADDR#";   sUserInfo.Time="#Now()#";   sUserInfo.Template="#CGI.CF_Template_Path#";   ID = "#session.cfid##session.cftoken#"; </cfscript> </cflock> Try changing from using the variable name #APPLICATION.applicationName# to just the hardcoded name solarcenter and reduce the timeout value: <cflock name="solarcenter" type="Exclusive" timeout="5" throwontimeout="Yes"> <!--- If Session-Tracker does not exist, generate it ---> <cfparam name="APPLICATION.SessionTracker" default=#StructNew()#> <cfset dummy = StructInsert(APPLICATION.SessionTracker, ID, sUserInfo, true)> </cflock> Of course there is always the 'When in doubt - stop/start the CF service' :-) Steve I played with some of the error handling and was able to get a little more information. The message says "Application.applicationName is in a scope that contains data shared across threads and cannot be accessed without an active lock". I know very little about session variables and locking.  Does that mean the problem is with the lock itself? ----- Excess quoted text cut - see Original Post for more -----   _____  
06/03/2004 11:45 AM
Author: Jamie Jackson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165407 Sounds like a change was made from the CF Admin -- a change that now requires you to lock shared scopes. Locking >> Server/Application/Session scope "Full Checking" would do this, I think. If you have to live with this global change in the CF Administrator (shared host, or something), then lock all of your application/session scope reads with read-only locks and lock all of your application/session scope writes with exclusive locks. Same with server scoped vars, though those are fairly unusual. Jamie On Thu, 03 Jun 2004 15:13:56 +0000, in cf-talk you wrote: ----- Excess quoted text cut - see Original Post for more -----
06/03/2004 11:37 AM
Author: Deanna Schneider Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165403 Sounds like the server admins just turned on strict locking validation. Have you talked to them? > The message says "Application.applicationName is in a scope that contains > data shared across threads and cannot be accessed without an active lock". > > I know very little about session variables and locking.  Does that mean the > problem is with the lock itself? >
06/03/2004 11:16 AM
Author: KeAnne Hoeg Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165399 I played with some of the error handling and was able to get a little more information. The message says "Application.applicationName is in a scope that contains data shared across threads and cannot be accessed without an active lock". I know very little about session variables and locking.  Does that mean the problem is with the lock itself? ----- Excess quoted text cut - see Original Post for more -----
06/03/2004 10:58 AM
Author: KeAnne Hoeg Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32967#165394 I inherited a site that uses session variables to track users' paths through the site and to handle the Admin login section.  The code worked fine until yesterday when it suddenly stopped working.  The only information I get is "Processing Error".  Does anyone have any idea why it suddenly stopped working?  One of the admins was able to log in as recently as 6/1. Here's the code in the Application.cfm file: <cfapplication   name="solarcenter"   sessionmanagement="Yes"   clientmanagement="Yes"   applicationtimeout=#createTimespan(0,0,90,0)#   sessiontimeout=#CreateTimespan(0,0,90,0)#>       <cflock name="#APPLICATION.applicationName#"         type="Exclusive"         timeout="20"         throwontimeout="Yes"> <!--- If Session-Tracker does not exist, generate it ---> <cfparam name="APPLICATION.SessionTracker" default=#StructNew()#> <!--- Log current user ---> <cfscript>   sUserInfo = StructNew();   sUserInfo.Address="#CGI.REMOTE_ADDR#";   sUserInfo.CFID="#session.cfid#";   sUserInfo.Token="#session.cftoken#";   sUserInfo.Address="#CGI.REMOTE_ADDR#";   sUserInfo.Time="#Now()#";   sUserInfo.Template="#CGI.CF_Template_Path#";   ID = "#session.cfid##session.cftoken#"; </cfscript> <cfset dummy = StructInsert(APPLICATION.SessionTracker, ID, sUserInfo, true)> </cflock>
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference