How many VitXi Users does my Server support?

The number of simultaneous VitXi Users will depend on the characteristics of your Server, especially the RAM memory.

Each VitXi user consumes an average of 3 Apache sessions.
Apache is configured to support 150 sessions, so the maximum would be 50 VitXi users connected at the same time, however this does not take into account VitalPBX GUI’s own administrative sessions.

Can I increase this number if I have enough resources on my Server?
Yes, you can increase the number of sessions, for which you must modify 1 parameter in the following file:

sudo nano /etc/apache2/mods-available/mpm_event.conf

MaxRequestWorkers: This parameter specifies the maximum number of concurrent connections.

Important: There is a hard ServerLimit 20000 build limit on the server. This is meant to prevent nasty effects caused by typos. To increase it further beyond this limit, you will need to modify the value of MAX_SERVER_LIMIT in the mpm source file and rebuild the server.

Finally, restart Apache

sudo /etc/init.d/apache2 restart

If you want to see the number of concurrent sessions Apache has run the following commands:

netstat -ant |grep -E ':80'|grep ESTAB | awk '{print $5}' | cut -d":" -f1 | sort | uniq -c | sort -nr
netstat -ant |grep -E ':443'|grep ESTAB | awk '{print $5}' | cut -d":" -f1 | sort | uniq -c | sort -nr
netstat -ant |grep -E ':8089'|grep ESTAB | awk '{print $5}' | cut -d":" -f1 | sort | uniq -c | sort -nr
netstat -ant |grep -E ':80|:443|:8089'|grep ESTAB | awk '{print $5}' | cut -d":" -f1 | sort | uniq -c | sort -nr

If you want to store the result in a file, just add at the end: >> log80.txt

If you want to know the total sum of Apache connections per port or in total of the 3 ports, use the following commands:

netstat -ant | grep -E ':80' | wc -l
netstat -ant | grep -E ':443' | wc -l
netstat -ant | grep -E ':8089' | wc -l
netstat -ant | grep -E ':80|:443|:8089' | wc -l

If you want to know how much RAM (MB) memory Apache is consuming, use the following command:

ps -ylC apache2 --sort:rss | awk '{SUM += $8; I += 1} END {print SUM/I/1024}'

Note:
Only applies to VitalPBX 4

To optimize Apache you must execute the following command:

vitalpbx optimize-apache
2 Likes