to flush the memory, import gc then call gc.collect()

On Monday, September 2, 2013 10:03:07 PM UTC-7, André Kablu wrote:
>
> Hi all,
>
> I'd created one application that loads 150000 lines of a mysql database.
> Then I put all 150k lines in a list(), doing many math calculations.
> The results are displayed to the user and process is finished.
> It is a very simple select, and a for loop to put values on the array and 
> do math calculations, then a for loop to create a table and displays on 
> screen, very simple.
>
> Strange memory usage is happening, every time I run this process, it 
> increases 5% of the memory memory. When it reaches 20% to 25% it gets 
> stable, and this memory is never flushed by WSGI handler.
> I am worried because this 25% of memory, in this case is almost 1,2Gb of 
> memory.
> I am using linux WSGI handler with apache and mysql.
>
>
> Is there any way to flush this memory usage every time the process finish?
>
>
> Thanks!
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to