Referring to this post, which is closed now: MQTT "close timeout" issue using Aedes - #14 by Steve-Mcl
I've had a few instances over the past two days where NR has stopped working as expected.
I've done restarts and it's gone back to "normal", however when it happened for the 3rd time today, I had to dig deeper.
The issue appears to relate to MQTT messages not being sent/received, so I decided to check the mosquitto log, using this command (thank you to @Colin for sharing that command in the previous post, above):
sudo tail -f /var/log/mosquitto/mosquitto.log
To find an error message that is being reported through my searches to related to too many open files, presumably above the 1024 limit.
I have found a few articles on how to fix it (a couple cited below), but as is the case, they advise different methods to resolve the issue:
I am hoping there is someone on the forum that knows the "best" way to do this, else I'll do some more research and go down the trial and error path.
Thanks in advance for any help!
EDIT: I've had a go and added the following line to /usr/lib/systemd/system/mosquitto.service:
then ran these...
sudo systemctl daemon-reload sudo service mosquitto stop sudo service mosquitto start
I just ran this after a restart to see the count of open connections:
sudo netstat -natp | grep ESTABLISHED.*mosquitto | wc -l
The count was 348. I will keep an eye on it, now that I know to run the command and see if it goes over 1,024, in which case the issue was related to the max number of open files.
Would still appreciate a steer if I'm headed down the wrong path