I'm pretty sure you can eliminate the session store as the source of your problem.
Use a different browser to access the admin pages so you don't have to worry about the polluting your test session with cookies. Make sure you delete all your site cookies every time you test. This should cause the problem to come back reliably. Look for multiple cookies from your site, such as thesite. com and www.thesite.com or www.thesite.com/thepage. If you are using Google Chrome to test, make sure you have a favicon file where Chrome can find it. Chrome mishandles session cookies if it can't find a favicon. Are you sure you want to rely on asynchronous interfaces for this application? How will you ensure all the user requests are in the table when the user goes to the other page to process them? You can watch the request/response traffic with Firebug. You can still allow anonymous access to site functions with Auth turned on ... On Sep 3, 4:07 am, Joe Barnhart <[email protected]> wrote: > This is still driving me nuts. I have an app that works some of the > time and totally inexplicably fails other times. When it fails it is > because it gets a new session_id value for every transaction with > web2py. > > I have a table where I keep information created by the user during > their session. They add to the table by clicking on a text field and > an AJAX call adds a item to the table with the session_id as a key. > The user is supposed to select all of the items in one place, then > they will be processed on another page. When it gets a unique > session_id for every item added, there is no way for the user to "see" > any of their items at all. The website completely fails. > > I have tried storing sessions on the file system. I tried storing > them in a table. I do not store anything in the session variable > except an integer and a string. All other data is kept in a table > referenced by the session_id, to prevent pickling problems. > > It almost seems as though the site cannot make a *new* cookie on my > browser. If I already have a cookie from web2py -- even if it is old > and for a different session -- the site works perfectly. If I go to a > new computer or browser which has never seen the site before, it > fails. If I have a friend try the site it fails. > > I have WingIDE and I can start putting breakpoints around > session.connect() but this is sort of a hard bug to reproduce. As > soon as I'm in the admin interface I have "logged on" and everything > works perfectly. Once I have it working on a browser, it's really > REALLY hard to get it in the failing state again. > > I fear it is a Heisenbug. (ref:http://en.wikipedia.org/wiki/ > Unusual_software_bug#Heisenbug ) > > -- Joe B. > > On Sep 1, 10:41 am, Joe Barnhart <[email protected]> wrote: > > > I have an application where I desperately need to track state while > > users navigate through the site. For a variety of reasons it is not > > appropriate to force them to sign up, so Auth is turned off. What I > > am finding is that the variable "response.session_id" takes on a > > unique value with every mouse click and AJAX send! > > > Please tell me there is a simple way around this. This is a very > > critical problem for my new site! > > > Warm regards, > > > Joe > >

