Re: cx_Oracle - Django ORM - Reference Count Increase
Anurag Chourasia <[email protected]> Mon, 29 Dec 2014 21:34:12 -0300
| Newsgroups | gmane.comp.python.db.cx-oracle |
|---|---|
| Message-ID | <CANFgmFDkMCJTnhusV2jSo0m1GrPViHh9c8BquuQHuSmhFXHaag@mail.gmail.com> |
Thanks for the response Shai. I indeed had DEBUG=True in my settings and I can confirm that changing it to False resolved this for me. Please note that I had already tried closing the DB Connection every once in a while but that did not help. *django.db.close_connection* For some reason, the list was not getting cleared with the close of the connnection. Regards, Guddu On Mon, Dec 29, 2014 at 6:18 PM, Shai Berger <shai-9mtU2oJkgntWk0Htik3J/[email protected]> wrote: > Hi, > > On Monday 29 December 2014 19:57:55 Amaury Forgeot d'Arc wrote: > > 2014-12-27 22:23 GMT+01:00 Anurag Chourasia <[email protected] > >: > > > I have a Long Running Python Process that uses Django ORM against > Oracle > > > database. > > > > > > The size of the process keeps on increasing steadily. > > > > > > I was profiling this process using mem_top and i find that the > reference > > > count of one particular data type <list> increases continuously with > > > iterations. > > > > > > Datatype is <type 'list'> [{u'time': u'0.004', u'sql': u'QUERY = > > > u\'SELECT "RANGE_STATUS"."I > > > > > > References increased from 534 to 53295 > > > > This list looks very much like this one: > > > https://docs.djangoproject.com/en/1.7/faq/models/#how-can-i-see-the-raw-sql > > -queries-django-is-running > > > > I don't know why there should be many references to it, but it's > definitely > > a Django thing. > > I am a Django core team member, and yes, this is definitely a Django thing. > > You can prevent this list from being created by changing your DEBUG > setting to > False; or, if you do need debug info, close the connection once in every > while; this will free the list of queries. A new connection will be opened > automatically when you execute the next database query (you cannot use the > CONN_MAX_AGE setting for this, because it is tied to the requests cycle, > and > you apparently do not have requests). > > As none of the above is Oracle-specific, the proper forum for further > discussion of this is the django-users list[1] or the #django IRC channel > on > freenode.net. > > [1] http://groups.google.com/group/django-users > > HTH, > Shai. > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > cx-oracle-users mailing list > cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ cx-oracle-users mailing list cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/cx-oracle-users