Doing a select(ALL) is completely out of the question. I'm already
releasing heavy objects, even doing calls to gc.collect() by hand, and
I've taken extra precautions to create methods that returns me rows in
groups of only 10k at a time. And I'm sure I'M not the one holding
references to those rows, but their memory still isn't going anywhere.


On Oct 18, 9:47 am, Michele Comitini <[email protected]>
wrote:
> You should give an idea of what your code looks like...
> anyway you may try to free some memory by removing references to
> "heavy" objects.
>
> rows = db(db.mytable.id>0).select(db.mytable.ALL)
> .
> . (do stuff)
> .
> rows = None # remove reference to query result
>
> .
> . (do stuff)
> .
>
> mic
>
> 2011/10/18 Petrucio <[email protected]>:
>
>
>
>
>
>
>
> > I'm using dal.py to do some basic database programming, but outside
> > web2py. It's basic stuff, but there's a ton of data, and it seems to
> > be getting cached and never freed, so I eventually get into
> > MemoryError land.
>
> > I've searched around and bumped into a lot of posts about using
> > cache.ram and cache.disk (and cache.ram.clear()), but haven't found
> > anything about how one should go about doing that outside web2py, or
> > if it's possible - should I go about solving all the unresolved
> > modules it finds? Would this get me where I want? How much work would
> > that be? I stopped early at pylab and have no idea how little/much
> > work that would be.
>
> > Sorry about the noob question, and sorry if it's repeated - I've done
> > my best to search around and came empty handed.
>
> > Thanks,
> > Petrucio

Reply via email to