I can reproduce this problem on both Linux and Windows (have no access to a 
Mac), and Massimo cannot reproduce this on his Mac. Perhaps something is 
borked about all my python installations (some site-packages I use or 
something). Can you help test? Just go into the web2py directory, and start 
python with the following script (or just start python and paste the script 
into the python console)

#!/usr/bin/python
#encoding: utf-8

# get a web2py database environment
import sys
sys.path.append('../../')
from gluon.dal import DAL

while 1:
    mydal = DAL('sqlite:memory')
    sys.stdout.write('.')
    sys.stdout.flush()
    mydal._adapter.close()

For me: memory usage grows at about 20MB/sec, measured with htop on linux 
and TaskManager on windows. If I wait enough time, all the memory is eaten 
up. If you drop the last line (mydal._adapter.close()) the memory will be 
eaten much more quickly for me.

Thanks.
Issue reference: 731 <http://code.google.com/p/web2py/issues/detail?id=731>: 
Standalone DAL is leaking memory+resources (don't know whether or not 
inside web2py)

Reply via email to