This would fetch all records in memory. Not a good idea. lys = db().select(db.wos_rou.id)
try this instead: lys = db().select(db.wos_rou.id,limitby=(0,100)) On Feb 3, 12:57 pm, Johann Spies <johann.sp...@gmail.com> wrote: > I am working with relatively large datasets (up to 450000 records) an > even when I try to minimize the memory usage by not doing a select on > all the fields I get this error on a 4G ram computer with a dataset of > about 150000 records): > > lys = db().select(db.wos_rou.id) > Exception in thread Thread-27: > Traceback (most recent call last): > File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner > self.run() > File "/home/js/web2py/gluon/contrib/cron.py", line 229, in run > shell=self.shell) > File "/usr/lib/python2.5/subprocess.py", line 594, in __init__ > errread, errwrite) > File "/usr/lib/python2.5/subprocess.py", line 1073, in _execute_child > self.pid = os.fork() > OSError: [Errno 12] Cannot allocate memory > > I cannot work like this. Is this a new bug? > > Regards > Johann -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.