5 Replies Latest reply on Nov 10, 2007 9:19 AM by Mike Besemer

    session variable mysteriously dropped

    Kac1e
      I have a session variable in my application, and sometimes it just mysteriously can not be found or it is 'undefined' right now it is undefined when using it in a query for a report. But on my bosses computer it is working. So right now he can view the data, but I get an undefined error. I lock it when I make it, and I used to have it locked everywhere I used it, but I changed it to lock only when I make it. I really don't understand locks, some say you need them every time, some say you don't. I also don't know if that has anything to do with why the session variable. The variable stays alive throughout all the pages...but once I get to the last page it dies...and only sometimes, like this hasn't happened to me since I took all the locks off. Keep in mind it is working fine for my boss right now...any suggestions?
        • 1. Re: session variable mysteriously dropped
          Kac1e Level 1
          OK so I have found some time and did some digging on this, it only gets lost on one page. The variable is used throughout the application and works throughout the application, accept for this one page. My boss pointed out something very interesting. I can navigate through the whole application, but when you go to that page the cfid changes. It is like you are a completely new person, here are the client variables on the page right before I get to the bad page:

          [code]
          Client Variables:
          cfid=174779
          cftoken=30604707
          hitcount=4
          lastvisit={ts '2007-09-18 11:18:57'}
          timecreated={ts '2007-09-18 11:18:47'}
          urltoken=CFID=174779&CFTOKEN=30604707
          [/code]

          Here is the client variables on the bad page:

          [code]
          Client Variables:
          cfid=174785
          cftoken=77405485
          hitcount=1
          lastvisit={ts '2007-09-18 11:21:21'}
          timecreated={ts '2007-09-18 11:21:21'}
          urltoken=CFID=174785&CFTOKEN=77405485
          [/code]

          Everything worked before, I have no idea how I broke it, does anyone know why this would be happening?
          The session variables I use I lock when I make them, as type="exclusive". Then I don't lock them anywhere else because they are just being read. They work fine too, you can just click right through all the pages back and forth until you ask for the bad page. Then it is as if you a completely new user. Any ideas PLEASE hints, something, I have been reading the documentation and can't find anything!
          • 2. session variable mysteriously dropped
            Kac1e Level 1
            Strangly enough the url variable makes it through

            <a href=" http://xxxxx.com/clickDetails.cfm?l=#getLinkInfo.linkID#">
            • 3. Re: session variable mysteriously dropped
              GavinBaumanis Level 1
              What version and updater version of CF are you using?

              I am experiencing exactly the same problem on our Production server.
              it is intermittent and complete confusing - "some" Session variables are just simply not being stored.
              • 4. Re: session variable mysteriously dropped
                Kicksome
                I have the exact same problem with CF 8. It's been impossible for me to duplicate. Sometimes various users just lose the session. They login - go to a page and "Session.whatever isn't there" It's very frustrating. I've been able to talk with a few users about the problem. They are repeat users so one day it works - the next day it doesn't. A couple have logged out cleared their cache and cookies and all the sudden it works. I started logging the session error - very few users get them but it's still a pain. We get about 20K users a day and we have lots of session errors.
                • 5. Re: session variable mysteriously dropped
                  Mike Besemer
                  I have the same problem. I changed from using session variables to cookies but the issue persists.