If you find that your /var/log/prosody/prosody.err log is being spammed with things like;
Failed to load accounts storage (‘cannot open /var/lib/prosody/xmpp%2eis/accounts/lunar.dat: Too many open files’) for user: [email protected]
Then the solution is to increase your system’s open file limit in /etc/sysctl.conf, /etc/security/limits.conf and to create a new file called /etc/default/prosody with the limits. You will need to run nano, vi, etc as root or use sudo for this to work.
To do this
fs.file-max = 999999
Run sysctl -p to apply the changes to /etc/sysctl.conf
prosody hard nofile 999999
prosody soft nofile 999999
If you’re using systemd garbage you need to modify /etc/systemd/system.conf as well and add this parameter.
After you’ve done all this you shouldn’t have a problem and Prosody will be able to open more files. Hope this helps anyone that runs into the same issue!