[Zope-dev] Re: Preliminary findings: Zope 2.7 leakage caused by errors

J. David Ibanez jdavid at itaapy.com
Fri May 21 10:50:18 EDT 2004


No, I don't use TranslationService. A quick glance at the code shows
that TS uses several caches (dictionaries) which are stored in the request
object: "_localizer_placeful_mc_cache", "_translation_service_cache"
and "_ts_domain_cache".

The values of these dictionaries are acquisition wrappers (objects returned
by "unrestrictedTraverse" or explicitly built). Maybe the leak is there.


Jean-Francois.Doyon at CCRS.NRCan.gc.ca wrote:

>Juan David,
>
>Indeed, thanks for the input, I've ruled out new_publish as the cause as
>well ...
>
>Right now, I'm at the stage where I severely suspect it's got something to
>do
>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
>TranslationService+Localizer
>combo to enable i18n in ZPT's on Zope 2?
>
>If I keep the above two, but delete my custom Localizer instances, the
>problem persists.
>
>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 ...
>
>Thanks,
>J.F.
>
>-----Original Message-----
>From: "J. David Ibáñez" [mailto:jdavid at itaapy.com]
>Sent: May 21, 2004 8:17 AM
>To: Jean-Francois.Doyon at CCRS.NRCan.gc.ca
>Cc: dieter at handshake.de; zope-dev at zope.org
>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, 
>as it
>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
>    try:
>        x = Publish.old_publish(request, module_name, after_list, debug)
>    except:
>        del Publish._requests[id]
>        raise
>    else:
>        try:
>            del Publish._requests[id]
>        except KeyError:
>...
>
>
>Though it is unlikely the leak to be there.
>
>  
>

-- 
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 




More information about the Zope-Dev mailing list