Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak - Basic Publish #125

Open
bafitor opened this issue Aug 10, 2018 · 0 comments
Open

Memory Leak - Basic Publish #125

bafitor opened this issue Aug 10, 2018 · 0 comments

Comments

@bafitor
Copy link

bafitor commented Aug 10, 2018

Hey guys,

I'm seeing a memory leak when using the 2.0.0 version of the library. Each call to basic_publish is increasing the memory consumption.

You can check the code below that easily triggers the issue. I'm seeing this behaviour on Ubuntu and OS X.

Details:
Python: 3.6.6
RabbitMQ: 3.7.6
Erlang: 20.3.5

Code:

    from librabbitmq import Connection, Message

    with Connection(host=HOST, port=PORT, userid=USERNAME, password=PASSWORD, virtual_host="/") as conn:
        with conn.channel() as channel:
            channel.exchange_declare(exchange='re', type='direct', auto_delete=False)

            data = json.dumps({
                'some_key': 'some_value'
            })

            message = Message(channel=channel, properties={}, body=data)

            while True:
                channel.basic_publish(message, 're', routing_key='')

I used the same code with amqp library and there wasn't any issue.

Can someone help figure this out?

Thanks

@bafitor bafitor changed the title Memory Leak Memory Leak - Basic Publish Aug 10, 2018
henryykt added a commit to henryykt/librabbitmq that referenced this issue Mar 23, 2020
henryykt added a commit to henryykt/librabbitmq that referenced this issue Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant