Memory leak in python

Nick Craig-Wood nick at craig-wood.com
Tue Apr 19 09:30:06 EDT 2005


Abhishek S <abhishek216 at yahoo.com> wrote:
>  I am seeing that the python application is very slowly
>  eating up the memory. i need help to indentify it.
> 
>  It start with 11MB and keeps growing by 1 MB around
>  every 30mins.
> 
>  #top | grep python
>  10351 root      15   0 26584  25M  3896 S     0.5  0.8  46:05   1 python2
[snip]
>  10351 root      15   0 26688  26M  3896 S     2.1  0.8  46:45   1 python2

Thats not a lot of leak - have you done that over a longer time
period?

>  let me know how to approch this.  gc.collect - does not collect
>  anything.

Are there any objects in gc.garbage?

Are you writing objects with __del__ methods?  If so then that is your
problem probably.

Have you written any extension modules in C?

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list