This will likely do it - tracking as a django middleware, I suspect too
much will still be lazy:

https://pypi.org/project/wsgi-objgraph/

On Tue, Nov 6, 2018 at 6:39 PM Dan Davis <dansm...@gmail.com> wrote:

> I am less certain this is the problem now.   It may simply be that my
> project is one of the larger on the server.   I did a quick audit, and
> although they are new to django, they either used connection.cursor() as a
> context manager, or called close explicitly.
>
> I will try to develop a middleware around pympler, tracemalloc, or
> objgraph.
>
> On Tue, Nov 6, 2018 at 6:23 PM Jason <jjohns98...@gmail.com> wrote:
>
>> oh boy...  Good luck.
>>
>> you can use connection.cursor() as a context manager, which will clean up
>> connections after it exits.  You could grep the project for
>> connection.cursor and add the context manager.
>>
>>
>> how did none of the devs know to clean up after themselves, either with a
>> context manager or try-finally?
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/TZ682yh2QfE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/0b436954-3e31-4dd7-b1ae-2bf75d72f472%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/0b436954-3e31-4dd7-b1ae-2bf75d72f472%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFzonYa88JNfCjkzfG1yastHs4T%2B96wC-i0iHaEwK%3DEmsnewxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to