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

CPU drain when trying to connect with wrong credentials. #10

Closed
gekola opened this issue Jul 15, 2016 · 2 comments
Closed

CPU drain when trying to connect with wrong credentials. #10

gekola opened this issue Jul 15, 2016 · 2 comments

Comments

@gekola
Copy link

gekola commented Jul 15, 2016

amqplib calls callback function provided to connect twice in some cases (e.g. when trying to connect with wrong username/password). This leads to exponential growth of retries which drains CPU and hangs application completely if retries limit is not set.

@abreits
Copy link
Owner

abreits commented Jul 18, 2016

It seems that the amqplib library returns multiple error callbacks when you connect with the wrong username/password, resulting in the behavior you describe. I have added a check to ignore the extra callbacks. I hope this solves the problem.

@gekola
Copy link
Author

gekola commented Jul 18, 2016

The fix works for me. Thanks a lot!

@gekola gekola closed this as completed Jul 18, 2016
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

2 participants