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

high CPU usage when replica set node down #171

Open
arthur-xie opened this issue Aug 8, 2017 · 3 comments
Open

high CPU usage when replica set node down #171

arthur-xie opened this issue Aug 8, 2017 · 3 comments

Comments

@arthur-xie
Copy link

When we shutdown one node of a replica set, the beam process consumes about 120%(multiple cores) CPU.
After some debugging, we found when any node down, the mc_monitor:check will crash on line {ok, Conn} = mc_worker_api:connect(ConnectArgs) because of unmatch between {error, econnrefused} and {ok, Conn}. This will make mc_monitor step into dead loop(no sleep because the Type is unknown).

@comtihon
Copy link
Owner

Hi. Yes, this is a known problem.
Can you mention all the steps to reproduce the problem? I would like to write a test on this as i don't have any replica set right now.

@wandermyz
Copy link

Any update on this?

@arihantdaga
Copy link

arihantdaga commented May 1, 2019

I am having the same issue -
Steps to reproduce.

  1. Have a mongodb replica server with 3 replicas.
  2. Turn off one of the secondary replica, which doesnt affect overall cluster, there is still one primary and one secondary.
  3. check with top on the machine with erlang mqtt driver running. You'll see beam.smp on top consuming high CPU.

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

4 participants