The canary middleware is middleware helps figure out if your application is leaking WSGI environment dictionary objects.
Wire up the middleware in your application:
from repoze.debug.canary import CanaryMiddleware
middleware = CanaryMiddleware(app)
Wire the canary middleware up into your pipeline:
[pipeline:main]
pipeline = egg:Paste#cgitb
egg:repoze.debug#canary
myapp
If refcounts to repoze.debug.canary.Canary grow without bound, you know you are leaking WSGI environment dictionaries. Use e.g. Dozer to find the reference leaks.