Hi Nick,
Thanks for reply... Please include me in reply.
Currently i am not in the list (i will subscribe soon)
I upgarded to 2.4.1 - still the same issue.
Nick>
Thats not a lot of leak - have you done that over a
longer time period?
Abhi>
I have tried for 4 days. It has reached 150MB.
Nick>
Are there any objects in gc.garbage?
>>> gc.set_debug(gc.DEBUG_LEAK)
>>> gc.get_debug( )
62
>>> gc.collect()
0
>>> gc.garbage
[]
>>>
Abhi>
There is none.
Nick>
Are you writing objects with __del__ methods? If so
then that is your problem probably.
Abhi>
I have not written any __del__ methods.
Nick>
Have you written any C extension modules in C?
Yes. Many - All of them are called only
when the app starts. And never called again.
Till then it is stable only - 16MB used.
I have tried following - let me know if you need any
more details.. and want me to try something.
1)
I found a "sizer" python program. Which gives me the
module which is growing. It indicates that __main__ is
growing.
__main__': 4000774
2) I tried following.. (not smart but..)
def f():
c = gc.get_objects()
j = 0
for i in c:
j = j + 1
try:
tmp = len(i)
if tmp > 1000:
print "(c[%d]) (%d)," % (j-1, tmp)
except:
pass
it prints me as folows:
l(c[175]) (7336),
l(c[12475]) (1260),
l(c[12477]) (1260),
l(c[12479]) (1381),
l(c[12481]) (1381),
l(c[34159]) (1200),
l(c[37144]) (28234),
l(c[37191]) (28286),
>>> type(c[37191])
<type 'dict'>
>>> for k,v in c[37164].items():
... print k, v
... b = b + 1
... if b > 30:
... break
...
1085115764 620
1080048556 2
1085045932 4
1085146316 1
1085246700 2
1090615060 9
1089571940 2
1090519084 2
1090876932 234
1093456364 48
1085168140 2
1089964748 6
1089994828 0
1090095684 69
1076932268 2
1085014108 6
1080092204 10
1084888812 1
1118543628 48
1089994860 6
1076731524 6
1079640188 3
1084883076 15
1079712492 1
1118459244 64
1080295564 1
1076522028 4
1085211788 2
1076887700 20
1076729756 70
1091012236 2
This two dict in the last is growing slowly..
I am not maintaing any dict with such indices and
value.
Any clue?
Please let me know what else to check and how!
At the time i am ending this.. module size..
'__main__': 7926830,
Thanks,
Abhishek
Note: forwarded message attached.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- Begin Message ---
Hi,
using python2.2.2
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
10351 root 15 0 26592 25M 3896 S 3.5 0.8
46:06 1 python2
10351 root 15 0 26596 25M 3896 S 30.9 0.8
46:07 0 python2
10351 root 15 0 26608 25M 3896 S 73.0 0.8
46:11 0 python2
10351 root 15 0 26612 25M 3896 S 73.2 0.8
46:15 0 python2
10351 root 15 0 26616 25M 3896 S 78.6 0.8
46:18 1 python2
10351 root 15 0 26620 25M 3896 S 78.4 0.8
46:22 1 python2
10351 root 15 0 26620 25M 3896 S 77.4 0.8
46:26 1 python2
10351 root 15 0 26620 25M 3896 S 73.2 0.8
46:30 1 python2
10351 root 15 0 26620 25M 3896 S 65.8 0.8
46:33 1 python2
10351 root 15 0 26620 25M 3896 S 43.3 0.8
46:35 1 python2
10351 root 15 0 26620 25M 3896 S 53.8 0.8
46:38 1 python2
10351 root 15 0 26620 25M 3896 S 26.3 0.8
46:39 1 python2
10351 root 15 0 26636 26M 3896 S 33.5 0.8
46:41 1 python2
10351 root 15 0 26640 26M 3896 S 25.7 0.8
46:42 1 python2
10351 root 15 0 26656 26M 3896 S 23.9 0.8
46:44 1 python2
10351 root 15 0 26656 26M 3896 S 11.7 0.8
46:44 1 python2
10351 root 15 0 26660 26M 3896 S 10.7 0.8
46:45 1 python2
10351 root 15 0 26668 26M 3896 S 3.7 0.8
46:45 1 python2
10351 root 15 0 26668 26M 3896 S 1.7 0.8
46:45 1 python2
10351 root 15 0 26668 26M 3896 S 0.7 0.8
46:45 1 python2
10351 root 15 0 26668 26M 3896 S 0.3 0.8
46:45 1 python2
10351 root 15 0 26684 26M 3896 S 4.5 0.8
46:45 1 python2
10351 root 15 0 26688 26M 3896 S 2.1 0.8
46:45 1 python2
let me know how to approch this.
gc.collect - does not collect anything.
Thanks,
Abhishek
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---
--
http://mail.python.org/mailman/listinfo/python-list