Django project eats memory

I have a django project, and the problem is - it eats a lot of memory and loads hosting.

How can I find problem areas in a project that contain a lot of memory?

+3
source share
3 answers

In general, for debugging / profiling, I offer the django-debug-toolbar as the source location, as well as various tips in:

http://docs.djangoproject.com/en/dev/topics/db/optimization/

However, this will not provide information on memory usage. If you really need it, you can try some middleware using pympler to use log memory while debugging and starting the development server.

http://www.rkblog.rk.edu.pl/w/p/profiling-django-object-size-and-memory-usage-pympler/?c=1

, webapps , dev-webserver (, ).

, , DEBUG=False:

http://docs.djangoproject.com/en/dev/faq/models/#why-is-django-leaking-memory

+3

Django DEBUG = True, Django , .

DEBUG, gc , , gc.set_debug(gc.DEBUG_LEAK) settings.py. , .

+4

, DEBUG = True. , -.

Django . , , , .

python, django.db.reset_queries() , . .

+1

All Articles