Re: [cx-oracle-users] cx_Oracle - Django ORM - Reference Count Increase
Brought to you by:
atuining
From: Shai B. <sh...@pl...> - 2014-12-29 21:37:18
|
Hi, On Monday 29 December 2014 19:57:55 Amaury Forgeot d'Arc wrote: > 2014-12-27 22:23 GMT+01:00 Anurag Chourasia <anu...@gm...>: > > 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. |