On Fri, Nov 20, 2009 at 10:22 PM, Karen Tracey <[email protected]> wrote:
> On Fri, Nov 20, 2009 at 6:19 PM, Doug Blank <[email protected]> wrote:
>>
>> Some additional data:
>>
>> I'm using Django 1.1 on Fedora11 with sqlite backend. I get the same
>> kind of spiking of memory usage if I just enter:
>>
>> >>> Person.objects.all().delete()
>>
>> Memory usage continues to grow, and it doesn't seem to be able to be
>> garbage collected. What could cause this? Anything I can set or issue
>> to make Django clean up/use less memory? I am running out of memory,
>> just deleting the data! Something seems to be very wrong...
>>
>
> Are you running this script with settings that have DEBUG set to True?
I did have DEBUG = False in settings.py, but I also confirmed that it
was the connections that were growing. On further inspection, I found
I had this tucked away in my non-browser, reloadable Python code:
from django.conf import settings
import web.settings as default_settings
try:
settings.configure(default_settings, DEBUG=True)
except RuntimeError:
# already configured; ignore
pass
which was causing part of the problem. It does seem that:
Table.objects.all().delete()
is "leaking" memory (eg, continues to use memory) and is very slow.
I'm trying to find a better (faster, less memory) method similar to
the manage.py command sql_flush...
Thank you very much for the pointer! Part of the problem solved...
-Doug
> See:
> http://docs.djangoproject.com/en/dev/faq/models/#why-is-django-leaking-memory
>
> Karen
ooglegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=.
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=.