Limit memory usage of Jitsi


I have installed Jitsi on a small VPS with only 2GB of RAM. I’m not planning to host large video conferences only 2 to 4 people at a time in a single meeting. It seems to be working fine for about ~15 min then the meeting drops for everyone without warning. I suspect it is running out of memory or something.

I read somewhere that the default memory settings is 3GB. How can I decrease it to < 2GB so that Jitsi doesn’t try to allocate more than the amount of RAM that is available?

Maybe run htop first to be sure it’s actually a memory issue? You didn’t say how many cores you have on the server. Yes, 2GB is really small, but frankly, Jitsi doesn’t use that much memory for 2-4 participants.

Well, it is jvb up to 3GB and jicofo up to 3GB and prosody and nginx also need some …
Set environment variable JICOFO_MAX_MEMORY=512m


You can actually put them in /etc/jitsi/jicofo/config and /etc/jitsi/videobridge/config

And see how it goes …

Hello @damencho
I have added VIDEOBRIDGE_MAX_MEMORY variable in the config file(Please find below). Is it the correct way to set it? Also Is there any way to verify it apart from running load?


# Jitsi Videobridge settings

# sets the XMPP domain (default: none)

# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
# Not needed when not using components (now using MUCs)

# sets the port of the XMPP server (default: 5275)

# sets the shared secret used to authenticate to the XMPP server

# extra options to pass to the JVB daemon

# Increasing jvb memory

# adds java system props that are passed to jvb (default are for home and logging config file)
JAVA_SYS_PROPS="-Dconfig.file=/etc/jitsi/videobridge/jvb.conf -Djava.util.logging.config.file=/etc/jitsi/videobridge/"

I got it. we can check it using service jitsi-videobridge2 status command. check Xmx6144m in below snippet.


jitsi-videobridge2.service - Jitsi Videobridge
   Loaded: loaded (/lib/systemd/system/jitsi-videobridge2.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-07-16 17:45:20 UTC; 11min ago
  Process: 22415 ExecStartPost=/bin/bash -c echo $MAINPID > /var/run/jitsi-videobridge/ (code=exited, status=0/SUCCESS)
 Main PID: 22414 (java)
    Tasks: 45 (limit: 65000)
   Memory: 267.4M
   CGroup: /system.slice/jitsi-videobridge2.service
           └─22414 java -Xmx6144m -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
1 Like