0
votes

I have an application that keeps giving me Variable undefined in session. This happens randomly. I can click on a page and get the error, log out and then back in and click on the same page and don't get the error, click three more pages fine, then click another page and get the error again. I have not found any rhyme or reason to it. In my application.cfm I have:

<cfset SessionTimeout = CreateTimeSpan(0, 2, 0, 0)>
<cfset LoginTimeout = 7200>
<cfapplication name="redbook"
           clientmanagement="Yes"
           sessionmanagement="Yes"
           setclientcookies="Yes"
           clientstorage="cookie"
           sessionTimeout = #SessionTimeout#>

In looking at a proxy debugger, I can see all my session variables declared on the page before it errors. On the next page (when it errors) the only session variables I see are:

cfid, cftoken, sessionid, urltoken

Has anyone else experienced this? I am running Coldfusion Version 9.0.2.282541 on Windows Server 2008 R2. Please let me know if you need any more details.

1
And are the cfid and cftoken values the same or different? Is there a change in domain name or http/https amongst these requests? Is there anything in the CF or JRun logs around when this happens? - Adam Cameron
The cfid and cftoken do change between the good page and the page that errors. I didn't notice this. What could cause that? There is no domain change or http/https between the pages. I don't have access to the jrun logs. The cflogs just state the "variable undefined in session" message. - Lauren Robinson
Sounds like a new session is being created. Is there maybe a process that clears out session vars that is being called/included inadvertently? Does this happen in all browsers or only a certain one? - Scott Stroz
What do you mean by 'proxy debugger'? Also, is there any hardware, like a load balance between client and server that might be dropping the session? - Scott Stroz
I got the load balancing turned off, and no more session error. Thanks a bunch!! - Lauren Robinson

1 Answers

0
votes

The issue was the load balancing. As it went from page to page, it sometimes switched servers, clearing out the session variables.