-
Notifications
You must be signed in to change notification settings - Fork 439
[amqp-bunny] High CPU usage since 0.9.10 #854
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Comments
When bunny doesn't see heartbeat key in bunnyConfig it set default value to 60 seconds. So when one set hearbeat to zero, code ignore setting this key to bunnyConfig
@DamienHarper please make your PR against this repository (files for The one you've made your PR for is read-only repository which is updated on each release via a spliting script. Thanks :) |
@Steveb-p I didn't make any PR, I just opened an issue (referencing the latest commit of the Setting a heartbeat value of 0 "spams" the RabbitMQ backend with heartbeat frames and keeps the CPU at 100% constantly so I don't think it's a good idea to let users do this. An easy solution is to revert PR #820, another one is to add documentation about the side effects of setting a 0 heartbeat and make sure that the default value is not 0 (when the |
The PR #820 has to reverted. |
maybe explicitly distinguish zero value and no value? It would be more intuitive imo. |
Thanks @makasim and @nightlinus for your quick feedback! |
Sorry, I misunderstood the reference. I thought it was a new PR. My bad.
Feel free to PR the revert commit :) It doesn't matter in the end, does it :) |
Done. PR #855 |
Since I updated to
amqp-bunny
from 0.9.9 to 0.9.10, I am experiencing constant very high CPU usage.I tracked down the root cause: I haven't set any
heartbeat
option inenqueue.yml
file and since version 0.9.10, it is assumed asheartbeat: 0
which causes the consumer to send heartbeat continuously (every 0s) to RabbitMQ rising up CPU usage to over 100% on each core.Here is an excerpt of an
enqueue.yml
file causing constant high CPU usage:Here is an excerpt of my
enqueue.yml
file solving the issue:Note:
enqueue.yml
format has changed since 0.9.8 but it is quite poorly documented or documentation has not been updated yet.The text was updated successfully, but these errors were encountered: