Re: django ORM memory leaks in standalone script
hello yakovenko sir, I think your databse_user and database_password are incorrect. I had affected by this problem. You will give correct username and password of mysql. On Sat, Jun 5, 2010 at 1:02 AM, tmitchellwrote: > Holy reading comprehension, Batman. Just saw you have DEBUG off, > ignore previous comment. > > On Jun 4, 10:34 am, Кирилл Яковенко > wrote: >> I have tried this method, but it didn't give any results. >> I suspect that this is due to incorrect settings of the database or connect >> to it. >> >> 2010/6/4 Dj Gilcrease >> >> >> >> > On Fri, Jun 4, 2010 at 6:44 AM, yakovenko wrote: >> > > import os >> > > import sys >> > > os.environ['DJANGO_SETTINGS_MODULE'] = 'md.settings' >> > > sys.path.append('/md/lib') >> > > from django.db import close_connection, reset_queries >> > > from md.mddata.models import Info >> > > def test(): >> > > for i in Info.objects.all(): >> > > pass >> >> > do >> >> > for i in Info.objects.all().iterator(): #or just .iterator() forget which >> >> > and you wont leak >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "Django users" group. >> > To post to this group, send email to django-us...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > django-users+unsubscr...@googlegroups.com > > groups.com> >> > . >> > For more options, visit this group at >> >http://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django ORM memory leaks in standalone script
Holy reading comprehension, Batman. Just saw you have DEBUG off, ignore previous comment. On Jun 4, 10:34 am, Кирилл Яковенкоwrote: > I have tried this method, but it didn't give any results. > I suspect that this is due to incorrect settings of the database or connect > to it. > > 2010/6/4 Dj Gilcrease > > > > > On Fri, Jun 4, 2010 at 6:44 AM, yakovenko wrote: > > > import os > > > import sys > > > os.environ['DJANGO_SETTINGS_MODULE'] = 'md.settings' > > > sys.path.append('/md/lib') > > > from django.db import close_connection, reset_queries > > > from md.mddata.models import Info > > > def test(): > > > for i in Info.objects.all(): > > > pass > > > do > > > for i in Info.objects.all().iterator(): #or just .iterator() forget which > > > and you wont leak > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com > groups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django ORM memory leaks in standalone script
Are you running with DEBUG on? I've noticed the same memory growth in standalone scripts when in DEBUG mode. It may be related to this: http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-debug On Jun 4, 10:34 am, Кирилл Яковенкоwrote: > I have tried this method, but it didn't give any results. > I suspect that this is due to incorrect settings of the database or connect > to it. > > 2010/6/4 Dj Gilcrease > > > > > On Fri, Jun 4, 2010 at 6:44 AM, yakovenko wrote: > > > import os > > > import sys > > > os.environ['DJANGO_SETTINGS_MODULE'] = 'md.settings' > > > sys.path.append('/md/lib') > > > from django.db import close_connection, reset_queries > > > from md.mddata.models import Info > > > def test(): > > > for i in Info.objects.all(): > > > pass > > > do > > > for i in Info.objects.all().iterator(): #or just .iterator() forget which > > > and you wont leak > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com > groups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django ORM memory leaks in standalone script
I have tried this method, but it didn't give any results. I suspect that this is due to incorrect settings of the database or connect to it. 2010/6/4 Dj Gilcrease> On Fri, Jun 4, 2010 at 6:44 AM, yakovenko wrote: > > import os > > import sys > > os.environ['DJANGO_SETTINGS_MODULE'] = 'md.settings' > > sys.path.append('/md/lib') > > from django.db import close_connection, reset_queries > > from md.mddata.models import Info > > def test(): > > for i in Info.objects.all(): > > pass > > do > > for i in Info.objects.all().iterator(): #or just .iterator() forget which > > and you wont leak > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django ORM memory leaks in standalone script
On Fri, Jun 4, 2010 at 6:44 AM, yakovenkowrote: > import os > import sys > os.environ['DJANGO_SETTINGS_MODULE'] = 'md.settings' > sys.path.append('/md/lib') > from django.db import close_connection, reset_queries > from md.mddata.models import Info > def test(): > for i in Info.objects.all(): > pass do for i in Info.objects.all().iterator(): #or just .iterator() forget which and you wont leak -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django ORM memory leaks in standalone script
Hello guys, I use django ORM in standalone daemon. And It sucks more and more memory. I have created small script for testing: --- import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'md.settings' sys.path.append('/md/lib') from django.db import close_connection, reset_queries from md.mddata.models import Info def test(): for i in Info.objects.all(): pass test() reset_queries() close_connection() --- This script sucks about 400 Mb and doesn't return theirs. Additional info: I use Debian 2.6.26-2-amd64. DEBUG is False in settings.py. What do I do wrong? Could this be due to not properly configure the connection? Setting of db is DATABASE_ENGINE = 'mysql' DATABASE_NAME = 'md' DATABASE_USER = 'md' DATABASE_PASSWORD = 'md' DATABASE_HOST = '' DATABASE_PORT = '' -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.