Issue #718 resolved

High count of uncollectable objects

Robert Brewer
created an issue

The 3.0.x branch is failing the threadlocal_garbage test with 768 unreachable objects.

My initial guess is that the {{{Request.prev}}} attribute is the culprit.

Comments (9)

  1. Robert Brewer reporter

    Workarounds for all 3.x versions:

    • If you're not using !InternalRedirects at all, remove the !InternalRedirector from the WSGI pipeline (this'll give you more requests-per-second to boot):
    app = cherrypy.tree.mount(root, '/', appconf)
    app.pipeline.remove(('iredir', InternalRedirector))
    • If you need !InternalRedirects, but don't need to access the chain of previous Request objects as you redirect, just comment out all code which references the .prev attribute of the Request object.

    A more complete fix on the way, and should be available in both trunk and 3.0.3.

  2. Robert Brewer reporter

    Final trunk fix in [1804], proving yet again that WSGI 1.0 middleware is pretty much required to be implemented as an (App class, Response class) pair if close() is to be called correctly throughout the WSGI stack.

  3. Log in to comment