ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Memory leak due to reference cycles #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> Which version of amqplib are you using?
0.6

> Which broker are you using (RabbitMQ?) which version?
RabbitMQ

> Which version of Python?
2.5.4

> What steps will reproduce the problem?

1. Make a connection to the broker
2. Request a channel
3. Do something e.g. publish message
4. close channel
5. close connection
6. Repeat #1

> What is the expected output? What do you see instead?

The process memory keeps growing.

> Please provide any additional information below.

The problem has been described by someone at LShift:

  http://www.lshift.net/blog/2008/11/14/tracing-python-memory-leaks

Doing the following fixes the leak
>>> del channel.callbacks
>>> del connection.channels
>>> del connection.connection

Original issue reported on code.google.com by dre...@gmail.com on 14 Sep 2009 at 11:30

GoogleCodeExporter commented 9 years ago
Please try the current version, 0.6.1, which includes at least two fixes for 
problems
relating to garbage collection.  You can download it from the frontpage, or 
this link

http://py-amqplib.googlecode.com/files/amqplib-0.6.1.tgz

Original comment by barry.pe...@gmail.com on 14 Sep 2009 at 3:20

GoogleCodeExporter commented 9 years ago
Nice! Thanks Barry. I should've read the hg commit logs.

Original comment by dre...@gmail.com on 14 Sep 2009 at 3:26