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 Ram and CPU Spikes causing OOM #60

Closed
Weafyr opened this issue Jul 31, 2023 · 11 comments
Closed

High Ram and CPU Spikes causing OOM #60

Weafyr opened this issue Jul 31, 2023 · 11 comments

Comments

@Weafyr
Copy link

Weafyr commented Jul 31, 2023

I run fresh installation of home assistant os on brand new odroid m1 (4GB version) and because of better HW I decided to go with better mqtt broker. But after installation of emqx addon, the ram and cpu consumption started spiking.

Detailed description (not from me) can be found here: emqx/emqx#10509

I have exactly same symptoms as creator of the issue in emqx repository.

image
image

@Weafyr
Copy link
Author

Weafyr commented Jul 31, 2023

image
image
image

@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 31, 2023
@KBrownConsulting
Copy link

I'm experiencing the same issue on v0.2.10

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Sep 3, 2023
@ahochsteger
Copy link

The same with v0.2.10 of EMQX HA Add-on, Home Assistant 2023.9.2, Supervisor 2023.09.2, Operating System 10.5, Frontend 20230911.0 on a Raspberry Pi 4B with 4GB (64bit Home Assistant OS).
The RAM usage of the EMQX add-on continuously flaps between 2.2% and 43.6%.

@crls00
Copy link

crls00 commented Sep 26, 2023

I'm also having the same issue with version 0.2.10 of the addon. Frequent memory spikes reaching over 94%, alarms every 3 minutes... 33 mqtt devices.

Home Assistant 2023.9.2
Supervisor 2023.09.2
Operating System 10.5
Frontend 20230911.0 - latest

EXSi VM running on i5 NUC

@mikimite
Copy link

mikimite commented Sep 28, 2023

Hi,
I think I may found it:
https://github.com/hassio-addons/addon-emqx/blob/718b5d880f84611cd79b5cdb79adde623776990e/emqx/Dockerfile#L31

Health check is running every 5 seconds the comand
/opt/emqx/bin/emqx_ctl status || exit 1

this starts a new erlang VM machine and causes spikes.
if you log into the container with
docker exec -it {your_container_name} /bin/sh and start running ps -axf repeated times at some point you will capture a new process and some of his sons

if you execute that same command:
/bin/sh -c '/opt/emqx/bin/emqx_ctl status' || exit 1 you will start the same process and observe that the cpu usage and memory goes up and new erlang machine starts

Edit: went to check official emqx docker image and it does not have that health check

@mikimite
Copy link

mikimite commented Sep 28, 2023

Confirmed by deploying a local modified addon removing the health. I stay like this until new release

@remcom
Copy link
Contributor

remcom commented Oct 22, 2023

I had the same issue. Removing the health check solved the issue for me

@webbson
Copy link

webbson commented Oct 23, 2023

I experience the same issue. If the fix is as simple as removing the health check that should probably be done asap. :)

@remcom
Copy link
Contributor

remcom commented Oct 23, 2023

I made a pull request for it to remove the health check

@frenck
Copy link
Member

frenck commented Oct 23, 2023

Fixed in #73

@frenck frenck closed this as completed Oct 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants