Hi,

Since more then one processes modifies my database I invoke objectstore.clear()
prior to fetching data I need to display.

I noticed that I have a huge objectleak all around (about 10k objects never get
collected at every request)

I wrote a testprogramm (atached) wich in a nutshell does
while 1:
  select
  objectstore.clear()
  gc.collect()
  print len(gc.get_objects())

The numbers rolling down my screen never stabilize or decrease until the
processes gets an out of memory exception.

However when I take the objectstore.clear() out, the number is constant (this is
not a solution for me, see first paragraph).

I also noticed that this doesn't happen on windows, only on linux.

I'm using:
cxOracle
Python 2.4
RedHat EL4
sqlalchemy 0.1.6

Cheers, Florian
from sqlalchemy import *
import gc

engine = 
create_engine('oracle://dsn=orcl&user=florian_test&password=florian_test')

foo = Table('foo', engine,
    Column('id', Integer, Sequence('foo_seq'), primary_key=True),
    )

try: foo.drop()
except: pass
try: foo.create()
except: pass

foo.insert().execute()

class Foo(object): pass
contents = mapper(Foo, foo)

while 1:
    contents.select()
    gc.collect()
    objectstore.clear()
    gc.collect()
    print len(gc.get_objects())

Reply via email to