我被限制在 Ejabberd 节点上使超过大约 64000 个(准确地说是 64,464 个)用户在线。我正在使用 xml 脚本 (Tsung) 让用户在节点上联机。
我已经提高了描述符的限制:
Eshell V5.10.4 (abort with ^G)
1> os:cmd("ulimit -n").
"1045000\n"
一个奇怪的观察是这样的(此处期望可用端口计数为整数值):
2> os:getenv("ERL_MAX_PORTS").
false
此外,ejabberdctl.cfg 文件中的“ERL_MAX_PORTS”设置为 704500。
ERL_MAX_PORTS=704500
我猜想一个Ejabberd节点对最大在线用户数有一些限制。这可能是依赖于机器或其他东西的内存。
此外,/etc/security/limits.conf 的外观如下:
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
root soft nofile 1045000
root hard nofile 1045000
我可以尝试创建另一个在同一台 Linux 计算机上运行的虚拟主机:
hosts:
- "devlab"
- "devlab2"
但我不确定这会有什么不同。
请指点。
谢谢!
最佳答案
除了操作系统的端口限制之外,您还必须配置 erlang 端口限制。这可以通过使用 +Q 参数( further information )启动 erlang 虚拟机来完成。
+Q Number|legacy Sets the maximum number of simultaneously existing ports for this system if a Number is passed as value. Valid range for Number is [1024-134217727]
例如:erl +Q 704500
您可以在 eshell 中使用以下命令检查 erlang 端口限制:
erlang:system_info(port_limit)
关于linux - Ejabberd 将在线用户数限制为 64,464。描述符已经增加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29888980/