So, my application apparently is the largest on our Django servers. This doesn't mean that a reference leak exists, but it could mean that a reference leak exists. I've been trying to find some generalizable way to search for such a problem. I have difficulties drawing help from within the organization, because I am one of the two most expert with Python/Django.
I've written a "leak checking WSGI middleware", hoping to force Django to serialize completely. It hasn't worked, really.
Can someone review this gist and suggest any changes: