[ic] help with sessions getting lost

Ed LaFrance edl at newmediaems.com
Wed Aug 27 10:54:12 EDT 2003

At 11:42 PM 8/26/2003 -0700, you wrote:
>I'm having a bit of a problem with one of my stores
>losing sessions that appears to be pretty random.  I
>have two catalogs running, along with a dev catalog,
>using 4.8.7 on RedHat w/Mysql. I am not able to follow
>any pattern to reproduce the problem, but clicking
>throughout the site and adding/having items in the
>cart will lose the cart.  Sometimes it takes a few
>clicks and sometimes it takes a bunch, but it's
>happening pretty frequently.  And it only happens on
>the one store, I haven't been able to recreate it on
>the other live store or our dev store.
>I've searched the list and found the issues about
>ssl/non-ssl on different servers (not the case here)
>and about dropping sessions in high/low traffic (we
>are running in rpc mode).  We haven't been able to
>track this down to any specific page that causes the
>session to be lost, sometimes it's lost when viewing
>the cart, other times it's lost just clicking on a
>link in the main nav menu we have.  Other times I get
>a 404 that it can't find the page nothing.html when I
>click on an Add to Cart button.  We have sessions to
>expire after two hours and run expire from cron every
>two hours.  I have tested it on both IE and NN and it
>happens on both so I'm pretty sure it's not a browser
>issue (and cookies are turned on).
>I'm stuck at where to start looking now, any
>assistance would be greatly appreciated.

The most common causes of losing sessions:

1. Bad link coding: using hard-coded URL's (i.e. <a 
href="/cgi-bin/cart/blah.html">) instead of the [area] or [page] tags. 
Unless the client's browser is supporting session cookies, this will fail, 
and it is almost never a good idea anyway;

2. Loss of session in form post: ensure that all forms contain:
         <input type=hidden name=mv_session_id value="[data session id]">

3. Interchange invalidates the session because it senses that the host or 
remote host has changed;

4. Very short SessionExpire times, file system issues;

1 or 2 are much more likely than 3 or 4 in my experience, and no doubt 
someone else could add to this list.

- Ed L.

New Media E.M.S.              Technology Solutions for Business
463 Main St., Suite D         eCommerce | Consulting | Hosting
Placerville, CA  95667        edl at newmediaems.com
(530) 622-9421                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (530) 622-9426 Fax

More information about the interchange-users mailing list