python startup memory size and memory leak 
Author Message
 python startup memory size and memory leak

Hello python-list,

        my app is a server that receive client's request in xml and query the mysql
database to response to client,I use python 2.0 on linux(2.2.13),with expat 1.95
statically link into python and MySQLdb 0.3.5,as I am not so familary with xml
so I didn't call unlink() on those created xml document before they are
deleted,this is definitely a leak,right?
        but this leak may show different behavior with different startup
environment.if all py is compiled into pyc and then start my app,top shows
that it takes about 2.8M memory at first,as client requests comes,memory goes up
very fast.then if I touch one of those py files and start my app again,top shows
that it takes about 5M memory at first,as client requests comes,memory goes up
very slow(althought it still leaking).
        I don't know why python startup size is different when I just touching
one of those py files but seems it related to python compilation.

Best regards,



Fri, 26 Dec 2003 09:43:09 GMT  
 python startup memory size and memory leak
Hello jerk,


j1> Hello python-list,

j1>         my app is a server that receive client's request in xml and query the mysql
j1> database to response to client,I use python 2.0 on linux(2.2.13),with expat 1.95
j1> statically link into python and MySQLdb 0.3.5,as I am not so familary with xml
j1> so I didn't call unlink() on those created xml document before they are
j1> deleted,this is definitely a leak,right?
j1>         but this leak may show different behavior with different startup
j1> environment.if all py is compiled into pyc and then start my app,top shows
j1> that it takes about 2.8M memory at first,as client requests comes,memory goes up
j1> very fast.then if I touch one of those py files and start my app again,top shows
j1> that it takes about 5M memory at first,as client requests comes,memory goes up
j1> very slow(althought it still leaking).
j1>         I don't know why python startup size is different when I just touching
j1> one of those py files but seems it related to python compilation.

        there is one more different behavior in two different startup
environment,there is a readline() call on a socket which will block when no data
send to server,with 2.8M memory startup python when I ctrl-C when readline is
waiting for input,instead of catching the keyboardInterrupt,python seg fault
with just one message "Python Fatal Error, Interpreter not initialized( version
mismatch)",but with the 5M memory startup python,it just catch the
keyboardInterrupt and exit normally

j1> Best regards,

Best regards,
My ICQ Number is:41597368



Fri, 26 Dec 2003 15:46:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Uninitialized memory errors and memory leaks in Tk

2. memory usage (how to debug a memory leak?)

3. ATTN All Python Gurus: Memory Leaks in Python

4. ATTN All Python Gurus: Memory Leaks in Python (not)

5. Ways to detect conventional memory size and Memory Low

6. Ways to detect conventional memory size and Memory Low

7. memory leak and leak-fixing 'patterns'

8. memory leaks in 1.5.2 Python interpreter

9. Memory leak when embedding Python 2.2?

10. Python 2.0: memory leak in "pdb"?

11. python 1.5.2 memory leak?

12. embedding python 1.5.2 problem - Py_Finalize memory leaks

 

 
Powered by phpBB® Forum Software