[Memory Usage] gradually growing
MongooseIM version: 4.2.0
Installed from: Helm chart (version 0.3.2)
Hello. I am applying it on k8s cluster and I am facing memory consumption issue on it.
vm.args)
online users count)
memory usage)
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
Not much reducing memory usage
I appreciate your help in advance.
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.
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.
Thank you for your response.
- at 20:00 login with 20 users and stay connect (regularly send ping request)
- I got this when I tried to use erl for memory check, I got this. (env with version 6.2.1)
Do you have any idea?
Use mongooseim debug to open debug shell.
Or
/usr/lib/mongooseim/bin/mongooseim debug
erl just starts an erlang VM. It usually opens it, when you have erlang installed. Except, MongooseIM has built-in erlang VM, so some parts of it are stripped away, so erl command does not work properly anymore. But the correct way to open shell is mongooseim anyway.