Indeed, thanks for the input, I've ruled out new_publish as the cause as
Right now, I'm at the stage where I severely suspect it's got something to
with i18n support or translation somehow, but don't know where exactly yet.
If I remove the message_catalog, the problem goes away.
If I remove the TranslationService instance, the problem goes away. Do you
use this? Does anybody know of alternatives to the
combo to enable i18n in ZPT's on Zope 2?
If I keep the above two, but delete my custom Localizer instances, the
I was trying to find an alternative message_catalog to use, but couldn't
find one (CMFLocalizer is based on yours).
So I'm going to try and narrow the field some more. I *quickly* looked
the message_catalog and TranslationService code, and nothing jumped out.
I have to also look at the ZPT engine itself, maybe it's i18n
support is the cause of the problem.
I'll run further tests ...
From: "J. David Ibáñez" [mailto:[EMAIL PROTECTED]
Sent: May 21, 2004 8:17 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Re: Preliminary findings: Zope 2.7 leakage
caused by errors
The problem I have with one of my sites seems to have a different cause,
does not show up when errors occur, but when requests are succesful.
So far I haven't been able to reproduce the problem.
You can try to modify "new_publish" to catch exceptions:
def new_publish(request, module_name, after_list, debug=0):
id = get_ident()
Publish._requests[id] = request
x = Publish.old_publish(request, module_name, after_list, debug)
Though it is unlikely the leak to be there.
[EMAIL PROTECTED] wrote:
>Indeed, I was hoping the ref in the dictionary there was getting in the way
>when old_publish was raising an exception, but I tried using a
>instead and that didn't help.
>I managed to test without Localizer (It dawned on me that since I'm looking
>at errors, it really doesn't matter if I don't have Localizer installed
>not having it will generate errors, which is what I want!) ... And the
>So it's definitely Localizer, but it's not the Globals() request patch ...
>at least not the act of patching it itself, that causes the problem.
>From: Dieter Maurer [mailto:[EMAIL PROTECTED]
>Sent: May 20, 2004 2:58 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
>[EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: RE: [Zope-dev] Re: Preliminary findings: Zope 2.7 leakage
>caused by errors
>[EMAIL PROTECTED] wrote at 2004-5-20 09:58 -0400:
>>def new_publish(request, module_name, after_list, debug=0):
>> id = get_ident()
>> print "Localizer got thread id: " + str(id)
>> Publish._requests[id] = request
>> print "Request dict is now: " + str(Publish._requests)
>> x = Publish.old_publish(request, module_name, after_list, debug)
>> del Publish._requests[id]
>> except KeyError:
>This code cannot leak requests in large numbers (though it may
>leak a few requests for some time).
>Reason: Zope does not normally create new threads. This implies
>that thread_ids are reused and thereby old requests flushed from
J. David Ibáñez
Founder and CTO of Itaapy <http://www.itaapy.com>
9 rue Darwin, 75018 Paris
Tel +33 (0)1 42 23 67 45 / Fax +33 (0)1 53 28 27 88
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -