We have a requirement to add 100k users to a single muc room in ejabberd server. We are using subscribe_room api to add users one by one. While adding users to the muc room, memory consumed by ejabberd is getting increased. At some point, the Ejabberd server was consuming 11GB of memory. Since memory consumption keeps on increasing, the Ejabberd server process is getting killed by the kernel. We are using the ejabberd-21.01 version.
- Do we need to change any configuration or are we missing anything?
- Is there a way to add multiple users to muc room in a single api call to ejabberd?
I don't know what 1 lakh is, but anyway:
XEP-0045 MUC is designed for a few users chatting, or a few hundreds... not for thousands or millions of bots receiving notifications. Bots don't care about presence, so using MUC is overkill.
You should check alternatives, for example: