Re: [Zope-dev] Session concurrency problem

2008-02-04 Thread Stephan Richter
On Wednesday 30 January 2008, Dieter Maurer wrote: 2. Sometimes, the session package data does not have the data in it and fails with a key error. This happens maybe 1 in 50 times and I have not reliably reproduced this problem. What is session package data? A very simple object: class

[Zope-dev] Session concurrency problem

2008-01-30 Thread Stephan Richter
Hi everyone, I have come across a situation, where temporarily the session data for a user is not available. Scenario: User 1 creates some session data. While a user 2 creates also some session data, user 1's data is not accessible. The problem plays out in two ways: 1. The data's __dict__

Re: [Zope-dev] Session concurrency problem

2008-01-30 Thread Dieter Maurer
Stephan Richter wrote at 2008-1-30 08:45 -0500: ... 1. The data's __dict__ returns an empty dictionary. When you access an attribute directly, though, the data can be seen. This symptom can be reliably reproduced. This is normal for persistent objects. When a persistent object is in Ghost

[Zope-dev] SESSION values only refreshing with Shift-reload

2006-09-29 Thread Tina Matter
I have a basic DTML document that has several input fields on it. When the user submits the form, validation occurs and goes to an error page, if need be. On my error page (dtml-document), there is a link to go back to the previous page to correct your errors. However, when I click on that link,

Re: [Zope-dev] SESSION values only refreshing with Shift-reload

2006-09-29 Thread Dieter Maurer
Tina Matter wrote at 2006-9-29 06:57 -0700: I have a basic DTML document that has several input fields on it. When the user submits the form, validation occurs and goes to an error page, if need be. On my error page (dtml-document), there is a link to go back to the previous page to correct

Re: [Zope-dev] SESSION values only refreshing with Shift-reload

2006-09-29 Thread Chris Withers
Hi Tina, Tina Matter wrote: I have a basic DTML document that has several input fields on it. I'm pretty sure you're looking for the zope@zope.org list ;-) On my error page (dtml-document), Use ZPT instead, or Twiddler when it's out ;-) However, when I click on that link, my SESSION

[Zope-dev] session cookies newbie question

2006-09-10 Thread Serge Zagorac
Hi All, I would like to access the browser's session cookie values. By browser's (or clients) session cookies I mean those cookies that have the expiry time set 'at end of session' and are not stored in the cookie.txt. Is there something in Zope's API that can help me do it. I need the

[Zope-dev] session error

2004-10-19 Thread Gerry Kirk
A user got this error trying to edit content. It only happened once, and on second try she was ok. Using Zope 2.7.0: Traceback (innermost last): Module ZPublisher.Publish, line 100, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object

Re: [Zope-dev] session error

2004-10-19 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 20 Oct 2004 04:23 am, Gerry Kirk wrote: A user got this error trying to edit content. It only happened once, and on second try she was ok. Using Zope 2.7.0: 2.7.3 (currently beta, but live on our production server) fixes errors of this

Re: [Zope-dev] session error

2004-10-19 Thread Andreas Jung
--On Mittwoch, 20. Oktober 2004 12:10 Uhr +1000 Richard Jones [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 20 Oct 2004 04:23 am, Gerry Kirk wrote: A user got this error trying to edit content. It only happened once, and on second try she was ok. Using Zope

Re: [Zope-dev] session problem again?

2004-09-29 Thread Chris McDonough
Matteo, I'm afraid that there's just no simple way turn Zope 2.6.X into a Zope that has all the fixes and patches of Zope 2.7.3. It's not an effort you can succeed at under the type of time pressure you seem to be under. A much better tact would be to make your application work under Zope

[Zope-dev] session problem again?

2004-09-28 Thread Matteo Memelli
Hello I include the conversation that I had today with Chris: I'm using Zope 2.6b1+ with ZWarehouse e-commerce product (ZWarehouse-20040522 version 0.8) I tried upgrading to Zope 2.7 but ZWarehouse gave me many problems so I decided to try applying your patches for Sessioning problems that I

Re: [Zope-dev] session problem again?

2004-09-28 Thread Michael Dunstan
On 29/09/2004, at 11:07 AM, Matteo Memelli wrote: Hello I include the conversation that I had today with Chris: I'm using Zope 2.6b1+ with ZWarehouse e-commerce product (ZWarehouse-20040522 version 0.8) I tried upgrading to Zope 2.7 but ZWarehouse gave me many problems so I decided to try applying

Re: [Zope-dev] session concurrency

2003-11-28 Thread santi
I have never seen disappearing sessions -- but I must admit that we use our own session implementation - deriving from Zope's session but getting rid of the over-complex session management code. I've not explained very well. Session object doesn't disappears, just some data in session object

Re: [Zope-dev] session concurrency

2003-11-27 Thread Santi Camps
It is unlikely that the the low conflict connection causes your problem. Low conflict affects the following situation: You try to load an object (because it is not in your ZODB cache) and get informed that is has been modified (by another commited transaction) since your

Re: [Zope-dev] session concurrency

2003-11-27 Thread Santi Camps
I'm not able to find where is the problem. I have not enought knowledge of Zope internals. I will try to store my data in persisten subobjects, as you said. Finally I've found a better and easy partial workarround. I will explain it here so other users in similar situation can know. It

Re: [Zope-dev] session concurrency

2003-11-27 Thread Dieter Maurer
Santi Camps wrote at 2003-11-27 17:41 +0100: ... One thing is true: Changing session object simultaniously in various frames doesn't work fine. Sometimes session data is not the espected becouse another frame has erased your changes in the session object. I think this is a serious

Re: [Zope-dev] session concurrency

2003-11-26 Thread santi
Santi Camps wrote at 2003-11-24 23:14 +0100: I've a product, http://zetadb.sourceforge.net, that uses SESSION extensively. I've just discover, unhappiness, that there are some problems when SESSION object is changed at the same time in two diferent python scripts (using frames). The two

Re: [Zope-dev] session concurrency

2003-11-26 Thread Dieter Maurer
[EMAIL PROTECTED] wrote at 2003-11-26 11:54 +0100: ... I'm trying to understand how Conflict Resolution works. The first step will be change my DirectoryStorage for a FileStorage and try again. This will have no influence to your session problems. Sessions are (by default) put into a RAM

[Zope-dev] session concurrency

2003-11-25 Thread Clemens Robbenhaar
Hi Santi, I've a product, http://zetadb.sourceforge.net, that uses SESSION extensively. I've just discover, unhappiness, that there are some problems when SESSION object is changed at the same time in two diferent python scripts (using frames). The two frames are changing diferent

Re: [Zope-dev] session concurrency

2003-11-25 Thread Dieter Maurer
Santi Camps wrote at 2003-11-24 23:14 +0100: I've a product, http://zetadb.sourceforge.net, that uses SESSION extensively. I've just discover, unhappiness, that there are some problems when SESSION object is changed at the same time in two diferent python scripts (using frames). The two

[Zope-dev] session concurrency

2003-11-24 Thread Santi Camps
Hi all, I've a product, http://zetadb.sourceforge.net, that uses SESSION extensively. I've just discover, unhappiness, that there are some problems when SESSION object is changed at the same time in two diferent python scripts (using frames). The two frames are changing diferent keys of the

[Zope-dev] SESSION loosing data when system has multiple users

2003-10-17 Thread Steve Jibson
We have been using Zope 2.7.0-beta2 and we have been having a bit of trouble with SESSION loosing data when we have more than one user on the system. These problems usually show up as KeyErrors when a particular data element in SESSION cannot be found. If I set the zserver threads to 1 in

Re: [Zope-dev] SESSION loosing data when system has multiple users

2003-10-17 Thread Steve Jibson
Chris, Sorry, I should have included more info, but my message was already a bit long. I have run the tests on both Red Hat 7.3 and Red Hat 9 with the same result. I am using python 2.2.3. Here is the step-by-step for what I did (I'm going to err on the side of too much info here): - check

Re: [Zope-dev] SESSION loosing data when system has multiple users

2003-10-17 Thread Chris McDonough
I will take a look. Thanks! - C On Fri, 2003-10-17 at 17:04, Steve Jibson wrote: Chris, Sorry, I should have included more info, but my message was already a bit long. I have run the tests on both Red Hat 7.3 and Red Hat 9 with the same result. I am using python 2.2.3. Here is the

Re: [Zope-dev] Session Errors (read conflicts)

2003-03-18 Thread Chris McDonough
On Mon, 2003-03-17 at 20:34, John Eikenberry wrote: John Eikenberry wrote: Toby Dickenson wrote: Read conflicts occur if a change is committed in between the start of a transaction, and the transaction needing to load the object. A workaround to reduce the number of read

Re: [Zope-dev] Session Errors

2003-03-18 Thread Chris McDonough
On Mon, 2003-03-17 at 15:02, Dieter Maurer wrote: You know that we use a Transience implementation with minimal (and not very essential) administrative data which is immune to inconsistencies and can be used across several ZEO clients (although we do not use that). We have good experience

Re: [Zope-dev] Session Errors (read conflicts)

2003-03-18 Thread Toby Dickenson
On Tuesday 18 March 2003 3:24 pm, Chris McDonough wrote: Our live sessions code uses the sessions about half to two-thirds of the way through the transaction. Given what can happen in that first half, there is easily plenty of time for read conflicts. I think I might be able to move our

Re: [Zope-dev] Session Errors (read conflicts)

2003-03-18 Thread Chris McDonough
Today you are guaranteed that your transaction reads a consistent initial state of A and B. That is, there is no chance that you only see half the changes of a recent transaction that modified both. Yes, it is possible for one transaction to modify A and a concurrent transaction to

Re: [Zope-dev] Session Errors (read conflicts)

2003-03-18 Thread Toby Dickenson
On Tuesday 18 March 2003 6:12 pm, Chris McDonough wrote: I'm thinking that I also may just need to move the housekeeping duties to a separate scheduled thread that only happens when the system is not busy (e.g. when the asyncore poll select timeout is reached maybe) in order to reduce the

Re: [Zope-dev] Session Errors (read conflicts)

2003-03-18 Thread Chris McDonough
On Tue, 2003-03-18 at 14:01, Toby Dickenson wrote: On Tuesday 18 March 2003 6:12 pm, Chris McDonough wrote: I'm thinking that I also may just need to move the housekeeping duties to a separate scheduled thread that only happens when the system is not busy (e.g. when the asyncore poll

Re: [Zope-dev] Session Errors (read conflicts)

2003-03-18 Thread John Eikenberry
Chris McDonough wrote: On Mon, 2003-03-17 at 20:34, John Eikenberry wrote: The KeyErrors happen under similar circumstances to the ReadConflictErrors. The significant difference being that the KeyErrors happen after the transience timeout has occured. When I am running with the

Re: [Zope-dev] Session Errors

2003-03-17 Thread Toby Dickenson
On Saturday 15 March 2003 5:40 pm, Chris McDonough wrote: - The second is an unidentified (yet) bug in TemporaryStorage. As a cause of the KeyError exception? Could be I have seen equivalent exceptions with plain FileStorage in applications that do not use sessions, so I suspect there

Re: [Zope-dev] Session Errors

2003-03-17 Thread Dieter Maurer
Hi Chris, Chris McDonough wrote at 2003-3-15 12:40 -0500: ... - The first is that turning off read conflicts allows for the potential for the session data bucket and the session data index to become out of sync. I admit that I knew this already, but haven't figured out a way

Re: [Zope-dev] Session Errors

2003-03-17 Thread John Eikenberry
Toby Dickenson wrote: Read conflicts occur if a change is committed in between the start of a transaction, and the transaction needing to load the object. A workaround to reduce the number of read conflicts is to touch the objects that are likely to change early in the transaction. Thanks

Re: [Zope-dev] Session Errors

2003-03-17 Thread John Eikenberry
John Eikenberry wrote: Toby Dickenson wrote: Read conflicts occur if a change is committed in between the start of a transaction, and the transaction needing to load the object. A workaround to reduce the number of read conflicts is to touch the objects that are likely to change

Re: [Zope-dev] Session Errors

2003-03-15 Thread Chris McDonough
Thanks so much for helping to pin this down. Thanks for the observation that the error occurs more frequently when the timeout is small. This is likely because the timeout value directly impacts the frequency of housekeeping operations, where old buckets are garbage collected and new buckets are

Re: [Zope-dev] Session Errors

2003-03-14 Thread John Eikenberry
Chris McDonough wrote: OK, thanks John. Thank you for helping. I hate to ask this (I should have done this to start with), but would you be willing to use the following patch --against the original file, not your recently patched version-- and try again? I only checked one of the two

Re: [Zope-dev] Session Errors

2003-03-14 Thread Chris McDonough
OK, thanks John. Let's try one more thing... currently the mounted database used to store the session data uses a connection that ignores read conflicts. This is known to be bad because the machinery which deals with keeping the sessioning index data will also ignore read conflicts, which may

Re: [Zope-dev] Session Errors

2003-03-14 Thread John Eikenberry
Sorry for the length of this one... but I'm trying to braindump to give you as much info about the problem as possible. To be sure it doesn't get lost in my below ramblings, there is probably important peice of information I haven't mentioned yet... that is that these errors seem to coincide

Re: [Zope-dev] Session Errors

2003-03-14 Thread John Eikenberry
John Eikenberry wrote: Once you start a second thread ReadConflictErrors start getting raised. Which thread gets the conflict and which one keeps working seems variable (probably just a timing thing). If I start enough of these threads I can cause the error to happen. But only once the

Re: [Zope-dev] Session Errors

2003-03-13 Thread Chris McDonough
John, Which Zope 2.6? Zope 2.6.1? Here's what line 807 of the current Transience.py looks like: v = self._data[b].get(k, notfound) Does yours look like that? What is the value of the __version__ variable at the top of the Transience.py file? On Thu, 2003-03-13 at 07:11, John

Re: [Zope-dev] Session Errors

2003-03-13 Thread John Eikenberry
Sorry, its Zope 2.6.1. Chris McDonough wrote: John, Which Zope 2.6? Zope 2.6.1? Here's what line 807 of the current Transience.py looks like: v = self._data[b].get(k, notfound) Does yours look like that? Yes. What is the value of the __version__ variable at the

Re: [Zope-dev] Session Errors

2003-03-13 Thread Chris McDonough
Hi John, Can you apply the attached diff to your Transience.py file and run with it in place for a couple of days? It will not fix the problem (the symptoms will remain) but it should print some diagnostic information to the Zope event log (the STUPID_LOG_FILE, hopefully you've got that going)

Re: [Zope-dev] Session Errors

2003-03-13 Thread John Eikenberry
Patch applied and the first results are in... so far its a lot of these: 2003-03-13T15:18:07 PROBLEM(100) Transience KeyError raised in get, checking _data BTree -- 2003-03-13T15:18:07 PROBLEM(100) Transience BTree check succeeded Chris McDonough wrote: Hi John, Can you apply the

Re: [Zope-dev] Session Errors

2003-03-13 Thread Chris McDonough
OK, thanks John. I hate to ask this (I should have done this to start with), but would you be willing to use the following patch --against the original file, not your recently patched version-- and try again? I only checked one of the two BTrees that might be at the heart of the problem with the

Re: [Zope-dev] Session Event Listeners

2003-02-27 Thread Chris Withers
Beef a wrote: Does anyone have any idea how to register session event listeners in Zope 2? Chris McDonough is tha man when it comes to this. It's probably all documented in the online Zope Book by now, or in the Zope distribution somewhere. In any case, he'll be able to tell you wehre to find

[Zope-dev] Session Event Listeners

2003-02-26 Thread Beef a
Does anyone have any idea how to register session event listeners in Zope 2? This is a standard concept in Java/JSP/ASP et al. Basically it allows a method to be registered and executed when a http session is either created, lost or invalidated. Is there such a thing in Zope? Thanks --

[Zope-dev] Session Event Listeners

2003-02-26 Thread Clemens Robbenhaar
Beef a writes: Does anyone have any idea how to register session event listeners in Zope 2? [..] Check with the /temp_folder/session_data in your Zope, or create your own Transient Object Container, if there is no such object. Cheers, Clemens ___

Re: [Zope-dev] Session Tracking in 2.5

2002-01-09 Thread Anthony Baxter
Chris McDonough wrote There are supposed to be docs for the sessioning stuff, and there *are* API docs in the help system. However, the narrative docs that went along with CST were not translated for the Zope 2.5 stuff. The docs folks here dont seem to think its important, so I may need

Re: [Zope-dev] Session Tracking in 2.5

2002-01-09 Thread Chris McDonough
Well, I know _I_ think Session support is important (hint: I wouldn't have spent the effort on SQLSession otherwise). If the decision was made to take the CST package and change the interface before making it part of the preinstalled set of Products, I'd _strongly_ urge that the

[Zope-dev] Session Tracking in 2.5

2002-01-08 Thread seb bacon
I thought it was time to catch up on the CST stuff which has made it into the core, only to find that it's only *based on* Chris' CST stuff. And I can't find a fishbowl project anywhere describing the rationale, apis, whatever... Is there a fishbowl for this? Or was session tracking

Re: [Zope-dev] Session Tracking in 2.5

2002-01-08 Thread Chris McDonough
CST was done via the fishbowl project at http://dev.zope.org/Wikis/DevSite/Projects/CoreSessionTracking/FrontPage. There is an explanation of the difference between the Zope 2.5 stuff and CST on the CurrentStatus page. Note that this situation makes me want to cry as well. There are supposed to

Re: [Zope-dev] Session Tracking in 2.5

2002-01-08 Thread seb bacon
On Tue, 2002-01-08 at 13:03, Chris McDonough wrote: There are supposed to be docs for the sessioning stuff, and there *are* API docs in the help system. However, the narrative docs that went along with CST were not translated for the Zope 2.5 stuff. The docs folks here dont seem to think

Re: [Zope-dev] Session Tracking in 2.5

2002-01-08 Thread Chris McDonough
It's important because session tracking is such a crucial feature for people migrating from other web platforms - seeing detailed documentation will make them so much more comfortable. it would also be a crying shame not to make use of all the docs you already generated along the way. I

Re: [Zope-dev] Session Tracking in 2.5

2002-01-08 Thread Dieter Maurer
Chris McDonough writes: The docs folks here dont seem to think its important, so I may need to do this and put it in the Dev Guide. As always, the developers are industrious and the documentors are lazy. As a result, source is usually far beyond the documentation ;-) Dieter

[Zope-dev] Session

2001-01-16 Thread Anderson Ami
How can I use this line ? Do I need any product ? dtml-call "Session.set('myVariable','somevalue') Anderson ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! **

Re: [Zope-dev] Session Objects?

2000-05-24 Thread Stuart 'Zen' Bishop
On Tue, 23 May 2000, Adam Pawliuk wrote: Although there is several user characteristics that we would like to store in a session object cached in server RAM, such as the user's unique system ID, greeting name, etc; rather than having to hit the DB for this information on each request.