openerp-community team mailing list archive
Mailing list archive
Re: force OpenERP / Python to release memory
This is an interesting point, and I did the test.
Making some searches leads me to:
Memory can be cleaned manually by calling garbage collector.
>>> import gc
Maybe this could be called by a cron task ?
2014-07-01 13:35 GMT+02:00 Ferdinand Gassauer <office@xxxxxxxxxx>:
> Having installed an instance (still openerp 6.1) on a auto-scale cloud
> server I am interested to reduce memory usage (night, weekends...) for
> which I get charged.
> A possible answer I found here:
> If the quote:
> *“For speed”, Python maintains an internal free list for integer objects.
> Unfortunately, that free list is both immortal and unbounded in size.
> floats also use an immortal & unbounded free list.*
> is true - memory will never decrease, as openerp/odoo heavily uses lists
> to store huge number of ids (account_move_lines, stock_moves, ...).
> Obviously a restart of the server will solve the problem, but I would be
> interested if other solutions exist.
> Ferdinand Gassauer
> ChriCar Bet. u. Ber. GmbH
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp