I have JUST started coding in Python, but I do remember the official
Python website where they state 'Python does not leak memory'. It did
seem to me as fairy tail, but would that be possible? Assuming that is
true (ahem), we'd probably be facing some sort of issue where objects
are not getting released instead of a true memory leak. The only
objects that get created are the connection handlers, right? Do any of
these run within threads? It could also be something that is not
getting shut down properly on the twisted module. My wild guesses.
The
js.io (I'm on 0.7.10) seems to be pretty stable and well-aware of
connections losses, both by the client and the server - question is -
how aware is the server code of connection losses? Can twisted really
track a lost connection properly?
The memory on the server is used at 1.5G, and it has not increased in
a long long time (over 6 months of running Orbited). I'm using
ActiveMQ though - are you guys using Orbited's MorbidQ?
Here's the pmap output for my orbited daemon:
>>pmap 20024
20024: /usr/bin/python /usr/bin/orbited -c auction_orbited.cfg
08048000 992K r-x-- /usr/bin/python2.5
08140000 148K rw--- /usr/bin/python2.5
08165000 14328K rw--- [ anon ]
b6700000 132K rw--- [ anon ]
b6721000 892K ----- [ anon ]
b68c6000 68K r-x-- /usr/lib/python2.5/lib-dynload/cPickle.so
b68d7000 4K rw--- /usr/lib/python2.5/lib-dynload/cPickle.so
b68d8000 4K ----- [ anon ]
b68d9000 8192K rw--- [ anon ]
b70d9000 4K ----- [ anon ]
b70da000 8580K rw--- [ anon ]
b793b000 1192K r-x-- /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7a65000 84K rw--- /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7a7a000 792K rw--- [ anon ]
b7b4b000 36K r-x-- /lib/tls/i686/cmov/
libnss_files-2.7.so
b7b54000 8K rw--- /lib/tls/i686/cmov/
libnss_files-2.7.so
b7b56000 32K r-x-- /lib/tls/i686/cmov/
libnss_nis-2.7.so
b7b5e000 8K rw--- /lib/tls/i686/cmov/
libnss_nis-2.7.so
b7b60000 80K r-x-- /lib/tls/i686/cmov/
libnsl-2.7.so
b7b74000 8K rw--- /lib/tls/i686/cmov/
libnsl-2.7.so
b7b76000 8K rw--- [ anon ]
b7b78000 28K r-x-- /lib/tls/i686/cmov/
libnss_compat-2.7.so
b7b7f000 8K rw--- /lib/tls/i686/cmov/
libnss_compat-2.7.so
b7b81000 260K rw--- [ anon ]
b7bc8000 12K r-x-- /lib/libuuid.so.1.2
b7bcb000 4K rw--- /lib/libuuid.so.1.2
b7bd0000 80K r-x-- /usr/lib/python2.5/lib-dynload/_ctypes.so
b7be4000 8K rw--- /usr/lib/python2.5/lib-dynload/_ctypes.so
b7be6000 8K r-x-- /usr/lib/python2.5/lib-dynload/_hashlib.so
b7be8000 4K rw--- /usr/lib/python2.5/lib-dynload/_hashlib.so
b7be9000 4K r-x-- /usr/lib/python2.5/site-packages/twisted/
protocols/_c_urlarg.so
b7bea000 4K rw--- /usr/lib/python2.5/site-packages/twisted/
protocols/_c_urlarg.so
b7beb000 12K r-x-- /usr/lib/python2.5/lib-dynload/termios.so
b7bee000 8K rw--- /usr/lib/python2.5/lib-dynload/termios.so
b7bf0000 8K r-x-- /usr/lib/python2.5/lib-dynload/_heapq.so
b7bf2000 8K rw--- /usr/lib/python2.5/lib-dynload/_heapq.so
b7bf4000 4K r-x-- /usr/lib/python2.5/lib-dynload/_bisect.so
b7bf5000 4K rw--- /usr/lib/python2.5/lib-dynload/_bisect.so
b7bf6000 20K r-x-- /usr/lib/python2.5/lib-dynload/itertools.so
b7bfb000 8K rw--- /usr/lib/python2.5/lib-dynload/itertools.so
b7bfd000 16K r-x-- /usr/lib/python2.5/lib-dynload/collections.so
b7c01000 4K rw--- /usr/lib/python2.5/lib-dynload/collections.so
b7c02000 8K r-x-- /usr/lib/python2.5/lib-dynload/grp.so
b7c04000 4K rw--- /usr/lib/python2.5/lib-dynload/grp.so
b7c05000 12K r-x-- /usr/lib/python2.5/lib-dynload/select.so
b7c08000 4K rw--- /usr/lib/python2.5/lib-dynload/select.so
b7c09000 12K r-x-- /usr/lib/python2.5/lib-dynload/fcntl.so
b7c0c000 4K rw--- /usr/lib/python2.5/lib-dynload/fcntl.so
b7c0d000 8K r-x-- /usr/lib/python2.5/lib-dynload/_random.so
b7c0f000 4K rw--- /usr/lib/python2.5/lib-dynload/_random.so
b7c10000 16K r-x-- /usr/lib/python2.5/lib-dynload/binascii.so
b7c14000 4K rw--- /usr/lib/python2.5/lib-dynload/binascii.so
b7c15000 12K r-x-- /usr/lib/python2.5/lib-dynload/math.so
b7c18000 4K rw--- /usr/lib/python2.5/lib-dynload/math.so
b7c19000 12K r-x-- /usr/lib/python2.5/lib-dynload/cStringIO.so
b7c1c000 4K rw--- /usr/lib/python2.5/lib-dynload/cStringIO.so
b7c1d000 12K rw--- [ anon ]
b7c20000 20K r-x-- /usr/lib/python2.5/lib-dynload/operator.so
b7c25000 4K rw--- /usr/lib/python2.5/lib-dynload/operator.so
b7c26000 20K r-x-- /usr/lib/python2.5/lib-dynload/_struct.so
b7c2b000 4K rw--- /usr/lib/python2.5/lib-dynload/_struct.so
b7c2c000 248K r-x-- /usr/lib/i686/cmov/libssl.so.0.9.8
b7c6a000 16K rw--- /usr/lib/i686/cmov/libssl.so.0.9.8
b7c6e000 12K r-x-- /usr/lib/python2.5/lib-dynload/_locale.so
b7c71000 4K rw--- /usr/lib/python2.5/lib-dynload/_locale.so
b7c72000 12K r-x-- /usr/lib/python2.5/lib-dynload/_ssl.so
b7c75000 4K rw--- /usr/lib/python2.5/lib-dynload/_ssl.so
b7c76000 44K r-x-- /usr/lib/python2.5/lib-dynload/_socket.so
b7c81000 12K rw--- /usr/lib/python2.5/lib-dynload/_socket.so
b7c84000 16K r-x-- /usr/lib/python2.5/site-packages/zope/
interface/_zope_interface_coptimizations.so
b7c88000 4K rw--- /usr/lib/python2.5/site-packages/zope/
interface/_zope_interface_coptimizations.so
b7c89000 60K r-x-- /usr/lib/python2.5/lib-dynload/datetime.so
b7c98000 12K rw--- /usr/lib/python2.5/lib-dynload/datetime.so
b7c9b000 16K r-x-- /usr/lib/python2.5/lib-dynload/strop.so
b7c9f000 8K rw--- /usr/lib/python2.5/lib-dynload/strop.so
b7ca1000 12K r-x-- /usr/lib/python2.5/lib-dynload/time.so
b7ca4000 8K rw--- /usr/lib/python2.5/lib-dynload/time.so
b7ca6000 80K r-x-- /usr/lib/libz.so.1.2.3.3
b7cba000 4K rw--- /usr/lib/libz.so.1.2.3.3
b7cbb000 16K r-x-- /usr/lib/python2.5/lib-dynload/zlib.so
b7cbf000 4K rw--- /usr/lib/python2.5/lib-dynload/zlib.so
b7cc0000 28K r--s- /usr/lib/gconv/gconv-modules.cache
b7cc7000 252K r---- /usr/lib/locale/en_US.utf8/LC_CTYPE
b7d06000 524K rw--- [ anon ]
b7d89000 1316K r-x-- /lib/tls/i686/cmov/
libc-2.7.so
b7ed2000 4K r---- /lib/tls/i686/cmov/
libc-2.7.so
b7ed3000 8K rw--- /lib/tls/i686/cmov/
libc-2.7.so
b7ed5000 12K rw--- [ anon ]
b7ed8000 140K r-x-- /lib/tls/i686/cmov/
libm-2.7.so
b7efb000 8K rw--- /lib/tls/i686/cmov/
libm-2.7.so
b7efd000 8K r-x-- /lib/tls/i686/cmov/
libutil-2.7.so
b7eff000 8K rw--- /lib/tls/i686/cmov/
libutil-2.7.so
b7f01000 4K rw--- [ anon ]
b7f02000 8K r-x-- /lib/tls/i686/cmov/
libdl-2.7.so
b7f04000 8K rw--- /lib/tls/i686/cmov/
libdl-2.7.so
b7f06000 80K r-x-- /lib/tls/i686/cmov/
libpthread-2.7.so
b7f1a000 8K rw--- /lib/tls/i686/cmov/
libpthread-2.7.so
b7f1c000 16K rw--- [ anon ]
b7f20000 4K r-x-- /usr/lib/python2.5/lib-dynload/_weakref.so
b7f21000 4K rw--- /usr/lib/python2.5/lib-dynload/_weakref.so
b7f22000 8K rw--- [ anon ]
b7f24000 4K r-x-- [ anon ]
b7f25000 104K r-x-- /lib/
ld-2.7.so
b7f3f000 8K rw--- /lib/
ld-2.7.so
bfc25000 176K rw--- [ stack ]
total 39604K
On Jun 22, 1:32 pm, Michael Carter <
cartermich...@gmail.com> wrote:
> After re-reading the thread I realize that there are reports from both 0.7.x
> and 0.8.x users. The comet layer of these releases are *completely*
> different, but they do share some other modules in common. Usually the most
> likely place for a memory leak is in the comet layer, so I would guess that
> we either have 2 separate issues. Less likely but also possible is that one
> of the shared modules is leaking.
>
> For all future emails on this thread, please state the exact version number
> of orbited you're using before you write anything else.
>
> On Tue, Jun 22, 2010 at 9:28 AM, Michael Carter <
cartermich...@gmail.com>wrote:
>
>
>
> > Here is my recommendation for tracking down the memory leaks:
>
> > 1) add twisted manhole to orbited so you can ssh/telnet into the live
> > process [1]
> > 2) ssh/telnet into your running orbited, and in the python shell: >>>
> > import objgraph
> > * objgraph info, see [2]
> > 3) >>> objgraph.show_most_common_types() to get a list of the most common
> > object instances
> > 4) lets say the most common instance is a list, then look at a random list
> > instance and see whats in it: random.choice(objgraph.by_type('list'))
> > 5) repeat step 4 a few times, then email results/transcript to the list.
>
> > [1]
> >
http://webcache.googleusercontent.com/search?q=cache:P3bHJILhBMgJ:blo...
> > On Tue, Jun 22, 2010 at 8:45 AM, desmaj <
monkeylo...@gmail.com> wrote:
>
> >> This goes out to all you memory leak hunters out there!
>
> >> Marius Gedminus has a nice post about visualizing the python object
> >> graph and hunting for leaks. There's even some code!
> >>
http://mg.pov.lt/blog/hunting-python-memleaks
>
> >> --
> >> You received this message because you are subscribed to the
> >> Orbited discussion group.
> >> To post, send email to
> >> <
orbite...@googlegroups.com>
> >> To unsubscribe, send email to
> >> <
orbited-user...@googlegroups.com<orbited-users%2Bunsubscribe@goo
glegroups.com>