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

RabbitMQ connections not closed if queue hasn't been declared #855

Closed
MPickfield opened this issue May 22, 2020 · 4 comments
Closed

RabbitMQ connections not closed if queue hasn't been declared #855

MPickfield opened this issue May 22, 2020 · 4 comments
Labels
bug Something isn't working stale All issues that are marked as stale due to inactivity

Comments

@MPickfield
Copy link

MPickfield commented May 22, 2020

If one configures a trigger such as

    - type: rabbitmq
      metadata:
        host: RabbitMqHost
        queueName: undeclared_queue
        queueLength  : '1'

Where undeclared_queue is a queue that has not been declared yet. Then connections will not be closed by keda causing rabbitmq to slowly run out of connections. Restarting the Keda operator frees up the connections.

Since rabbitmq allows for queues to be declared by consumers or producers or defines server side, an option such as declareQueue that declares a queue if it doesn't exist yet might be useful.

Expected Behavior

Connections should be closed when no longer in use, regardless of error states.

Actual Behavior

Connections are not closed in this case.

Steps to Reproduce the Problem

  1. Define a trigger as described above, perhaps with a short polling interval
  2. Do not declare the queue
  3. The connections tab of the rabbitmq management interface will fill up with connections from the keda operators ip, all of which will have 0 channels open.

Specifications

  • **KEDA Version: 1.4.1
  • **Platform & Version: Google cloud Platform
  • **Kubernetes Version: v1.14.10-gke.36
  • **Scaler(s): RabbitMQ
@MPickfield MPickfield added the bug Something isn't working label May 22, 2020
@balchua
Copy link
Contributor

balchua commented May 23, 2020

@MPickfield How can i reproduce this? So far the queues are automatically created when i start the consumer.

I also do not see that the connections are piling up. I only see one connection which is from the consumer.

Thanks!

@MPickfield
Copy link
Author

So far the queues are automatically created when i start the consumer

I think it would depend on the implementation of your consumer, which likely declares the queue. If the consumer listens on 'queue1' and this trigger is configured for 'queue1' you won''t have an issue, but if you are listening on a queue that hasn't been declared (say you had a typo in the queue name) I believe this issue arises.

@stale
Copy link

stale bot commented Oct 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Oct 13, 2021
@stale
Copy link

stale bot commented Oct 20, 2021

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale All issues that are marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants