mosquitto 修改最大连接数限制
sudo vim /etc/init.d/mosquitto
Change /bin/sh to /bin/bash for fixing "ulimit -u illegal option" error
set_ulimit () {
ulimit -f unlimited
ulimit -t unlimited
ulimit -v unlimited
ulimit -n 1048576
ulimit -m unlimited
ulimit -u 1048576
}
start)
...
# Update ulimit config in start command
set_ulimit
...
;;
stop)
After changed the config, reload systemctl config and restart mosquitto
sudo systemctl daemon-reload
sudo service mosquitto stop
sudo service mosquitto start
https://stackoverflow.com/questions/40199152/mosquitto-increase-max-connections
本文链接地址:https://const.net.cn/729.html