Re: [Zope] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-04 Thread Dieter Maurer
yacine chaouche wrote at 2007-2-3 13:55 +0100:
 ...
Once I understood the publishing process, I edited the publish.py file
to display a traceback  of every raised exception before retrying the
request. Thus, I could see that there were database conflict errors
that were raised.

Usually, such conflicts are logged -- without a need to
change Publish.py.

 ...
When I do not use session, in my own code, I have no errors. This is
supposed to prove that the conflict error comes from the use of the
session object in my code. This is not supposed to prove that another
plugin is using it anyway...

Sorry, I did not read your message carefully enough.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-03 Thread yacine chaouche

Hi Dieter,

What part of what I said don't you understand ? I will try to make it
clearer here :


  The referenced links above do not refer to conflict errors
  but to XMLRPC and strace.

  Then, too, I had great difficulties to understand your problem...


Yes, when I posted the XMLRPC and strace message on the list I did not
know yet the publishing process and everything. So I thought that zope
just went crazy pretending to receive new requests. In reality, it was
the same request that was retried over and over again until no
exception was raised.

Once I understood the publishing process, I edited the publish.py file
to display a traceback  of every raised exception before retrying the
request. Thus, I could see that there were database conflict errors
that were raised.



I am aware that conflicts occure up to 20% of the time, but in my case
it is almost 100% in this specific situation !

You can easily achieve almost sure conflicts.

We did once with a frame based solution:


I do NOT use frames.


If I do not use the session object in my code, I have no errors at all
and everything just goes fine.

Then, you are using some add-on component that *is* using the session
object.



That's what I am saying : in my code I need to use the session to
store objects. When I use the session, in my code, not in a plugin or
so, in my own code, I have errors.
When I do not use session, in my own code, I have no errors. This is
supposed to prove that the conflict error comes from the use of the
session object in my code. This is not supposed to prove that another
plugin is using it anyway...

Thanks,

Y.Chaouche

2007/2/2, Dieter Maurer [EMAIL PROTECTED]:

yacine chaouche wrote at 2007-2-2 14:39 +0100:
 ...
 As discussed  here :
 http://mail.zope.org/pipermail/zope/2007-January/170151.html
 and continued here :
 http://mail.zope.org/pipermail/zope/2007-January/170156.html

 I am experiencing issues regarding a database ConflictError on session 
objects.

Hm, I have issues with your problem descriptions...

  The referenced links above do not refer to conflict errors
  but to XMLRPC and strace.

  Then, too, I had great difficulties to understand your problem...

 ...
It is not a ReadConflictError, nor a
WriteConflictError. It is a ConflictError: database conflict error.

A ConflictError is in fact a WriteConflictError.

I am aware that conflicts occure up to 20% of the time, but in my case
it is almost 100% in this specific situation !

You can easily achieve almost sure conflicts.

We did once with a frame based solution:

   All frames in a frameset accessed the session and tried
   to store some information in it.

   As the browser requested the frames concurrently, there
   was a very high probablity for conflicts.

In our case, there was no real need for most of the frames
to access the session. Removing the unnecessary accesses removed
the problem.

But, if the frames had a real need to store something in the
session, we would have to use persistent subobjects in the session
to separate the access of the various frames into different objects.

If I do not use the session object in my code, I have no errors at all
and everything just goes fine.

Then, you are using some add-on component that *is* using the session
object.

If the session is not used, there will be no session
related conflict error.

Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
am stuck on this for 2 weeks now.

You could try to delete /temp_folder/session_data temporarily
(it will be recreated on the next Zope startup) to find out
which component does use sessions.



--
Dieter


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-03 Thread Michael Dunstan

On 2/3/07, yacine chaouche [EMAIL PROTECTED] wrote:

I am experiencing issues regarding a database ConflictError on session objects.


Can you detail all the various getSesion and setSession methods of:

 http://mail.zope.org/pipermail/zope/2007-January/170167.html


I use zope 2.9.0 python 2.4.2.


It's worth trying the latest of each of those.

Cheers
Michael
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread yacine chaouche

Hi all,

As discussed  here :
http://mail.zope.org/pipermail/zope/2007-January/170151.html
and continued here :
http://mail.zope.org/pipermail/zope/2007-January/170156.html

I am experiencing issues regarding a database ConflictError on session objects.

I use zope 2.9.0 python 2.4.2, and the code of the MultiDB support has
been patched (as suggested by Florent Guillaume)
http://mail.zope.org/pipermail/zodb-dev/2006-January/009737.html

My main concern is to debug my application where, on every couple of
requests coming from two different browsers at the same time (before
the first request is , one of them wins and the other always fails and
raises a conflict error. It is not a ReadConflictError, nor a
WriteConflictError. It is a ConflictError: database conflict error.
I am aware that conflicts occure up to 20% of the time, but in my case
it is almost 100% in this specific situation !

If I do not use the session object in my code, I have no errors at all
and everything just goes fine.

Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
am stuck on this for 2 weeks now.

NOTE : I do not use Zeo, nor frames.

Thanks,

Y.Chaouche
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread Dieter Maurer
yacine chaouche wrote at 2007-2-2 14:39 +0100:
 ...
 As discussed  here :
 http://mail.zope.org/pipermail/zope/2007-January/170151.html
 and continued here :
 http://mail.zope.org/pipermail/zope/2007-January/170156.html
 
 I am experiencing issues regarding a database ConflictError on session 
 objects.

Hm, I have issues with your problem descriptions...

  The referenced links above do not refer to conflict errors
  but to XMLRPC and strace.

  Then, too, I had great difficulties to understand your problem...

 ...
It is not a ReadConflictError, nor a
WriteConflictError. It is a ConflictError: database conflict error.

A ConflictError is in fact a WriteConflictError.

I am aware that conflicts occure up to 20% of the time, but in my case
it is almost 100% in this specific situation !

You can easily achieve almost sure conflicts.

We did once with a frame based solution:

   All frames in a frameset accessed the session and tried
   to store some information in it.

   As the browser requested the frames concurrently, there
   was a very high probablity for conflicts.

In our case, there was no real need for most of the frames
to access the session. Removing the unnecessary accesses removed
the problem.

But, if the frames had a real need to store something in the
session, we would have to use persistent subobjects in the session
to separate the access of the various frames into different objects.

If I do not use the session object in my code, I have no errors at all
and everything just goes fine.

Then, you are using some add-on component that *is* using the session
object.

If the session is not used, there will be no session
related conflict error.

Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
am stuck on this for 2 weeks now.

You could try to delete /temp_folder/session_data temporarily
(it will be recreated on the next Zope startup) to find out
which component does use sessions.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )