There is a bug in the RAM-based session data container implementation that causes this under load. I've fixed it in a sandbox here (more or less), but I've not had time to package it up nicely... I am so far overdue in doing this that I'm not even going to say it'll be RSN. In the meantime, please use an external data container. Many apologies, - C Ron Bickers wrote:
I'm running into what appears to be the same problem brought up by others several months ago regarding "random" disappearing of session variables under CoreSessionTracking. After combing through the archives, there didn't appear to be any definitive answer for the problems.
I *think* my setup is fairly basic, but I can't figure out how to consistently reproduce the problem. In fact, *I* haven't been able to make it happen at all, but every 1-2 out of 10 orders ends up with an empty cart, and the customer clearly remembers their cart was not empty.
I'm not using ZEO or anything fancy, just the RAM-based storage and cookies. I have the following setup for adding, updating, and viewing the cart:
Python Script 'add':
'item' is a dictionary that is populated with simple numbers and strings. 'cart' is an array of 'items' and is stored like this:
session = context.SDM.getSessionData() cart = session.get('cart', []) cart.append(item) session.set('cart', cart)
Python Script 'update':
A form passes in 'remove' as the cart index of the item to be removed:
session = context.SDM.getSessionData() cart = session.get('cart', []) remove = REQUEST.form.get('remove', None) if remove is not None: del cart[remove] session.set('cart', cart)
To place the items in a mail message for sending the order, I use the following simple Python Script and loop over it with dtml-in:
session = context.SDM.getSessionData() return session.get('cart', [])
This seems so simple, but seemingly randomly the above script returns [] instead of what is in the cart. There is another session variable (a dictionary 'custinfo') that is populated towards the end of the user's ordering process that has so far not been empty on any orders.
I wish I could provide more, but I don't know what else to try. Maybe someone can see a flaw in the way I'm storing the cart that might cause CST to freak...like some persistence triggering problem or something like that.
_______________________
Ron Bickers Logic Etc, Inc.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"