Skip to main content
Known Participant
May 8, 2009
Answered

lost sessions

  • May 8, 2009
  • 2 replies
  • 598 views

We're noticing some errors that might suggest sessions are getting lost.  It happens maybe once or twice a day on a website that gets a maybe a thousand visitors a day.  Is this normal? Is it likely something that can be fixed within Coldfusion, or is it something that is probably beyond our control?

    This topic has been closed for replies.
    Correct answer ilssac

    There are several ways that sessions can be lost.  Some of them are in your control some are not.

    The first thing to consider is that session state requires that cfid & cftoken OR a jsessionid values are returned by a client for every request that should belong to an earlier session state.  These values are usually returned in cookies but can sometimes applications are configured to pass then through get aka url variables.  If anything prevents these variables from being returned ColdFusion will not know what session a request belongs to and just create a new one for the request.

    Common things can that mess with cookies that our out of your control, are browsers with cookies disables.  Virus|Anti-spam|spyware tools that strip cookies from requests or old or badly functioning proxy servers that strips OR caches cookies are three that I have seen in times past.

    You should do every thing in your power to make sure there are not odd paths through your applications that maybe unintentionally eliminating state data.  But that can only be done by analyzing your application and trapping these errors and determining their causes.

    2 replies

    Inspiring
    May 15, 2009

    What are the sort of "errors that might suggest that sessions are getting lost?"

    It's very helpful to include a customer-feedback "contact the webmaster" link ... one that is as technically-uncomplicated as possible ... because when you do so, customers will often tell you about what just happened to them; what went wrong.  Although you get a fair amount of fluff and spam from such feeds also, it can alert you to problems that you don't know about (and greatly help to diagnose the ones that you do).

    ilssac
    ilssacCorrect answer
    Inspiring
    May 8, 2009

    There are several ways that sessions can be lost.  Some of them are in your control some are not.

    The first thing to consider is that session state requires that cfid & cftoken OR a jsessionid values are returned by a client for every request that should belong to an earlier session state.  These values are usually returned in cookies but can sometimes applications are configured to pass then through get aka url variables.  If anything prevents these variables from being returned ColdFusion will not know what session a request belongs to and just create a new one for the request.

    Common things can that mess with cookies that our out of your control, are browsers with cookies disables.  Virus|Anti-spam|spyware tools that strip cookies from requests or old or badly functioning proxy servers that strips OR caches cookies are three that I have seen in times past.

    You should do every thing in your power to make sure there are not odd paths through your applications that maybe unintentionally eliminating state data.  But that can only be done by analyzing your application and trapping these errors and determining their causes.