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

[Memory Usage] gradually growing #4477

Open
fluttercid opened this issue Feb 4, 2025 · 3 comments
Open

[Memory Usage] gradually growing #4477

fluttercid opened this issue Feb 4, 2025 · 3 comments

Comments

@fluttercid
Copy link

fluttercid commented Feb 4, 2025

MongooseIM version: 4.2.0
Installed from: Helm chart (version 0.3.2)
Image

Hello.
I am applying it on k8s cluster and I am facing memory consumption issue on it.

vm.args)

Image

online users count)

Image

memory usage)

Image

Image

When 23 or 24 users are online without messages, memory usage is increased as above.
Is this normal consumption with these users?
If not, what and where can I adjust configurations?


After all users logout
There is no change on onlineusers
Image

Not much reducing memory usage
Image

I appreciate your help in advance.

@arcusfelis
Copy link
Contributor

Sure, connect to the erlang remote shell, check what is using memory:

        rp([{Len, case erlang:process_info(TopPid, registered_name) of {_,X} -> X; _ -> TopPid end, erlang:process_info(TopPid, [current_stacktrace])} || {Len, TopPid} <- lists:sublist(lists:reverse(lists:keysort(1, [{try element(2,erlang:process_info(Pid, memory)) catch _:_ -> -1 end, Pid} || Pid <- erlang:processes()])), 20)]).

Will show you which processes consume the most of memory.
You can wait a bit and run in again. And check which processes consume the most.

To open debug shell, use something like mongooseim debug when connecting to the container shell.

@arcusfelis
Copy link
Contributor

Extra information:

  • not ok, something could be wrong with your installation - could be some issue, like DB connection issues, or something is not consuming messages.
  • Check logs for more messages.
  • Debug with function above.
  • Our current installations have memory which is scales well with the number of users. So, your memory should be around 200megabytes (see the start of the graph). Maybe something happened at 20:00.

@fluttercid
Copy link
Author

Thank you for your response.

  1. at 20:00 login with 20 users and stay connect (regularly send ping request)
  2. I got this when I tried to use erl for memory check, I got this. (env with version 6.2.1)

Image
Do you have any idea?

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