I'm trying to fix the following error that I get after a day or two of running my game server.
2017/12/13 12:08:35 http: Accept error: accept tcp [::]:8081: accept4: too many open files; retrying in 1s
I added "fs.file-max = 2000000" to /etc/sysctl.conf and executed
sysctl -w fs.file-max=2000000
sysctl -p
My global limits are now updated (do I need to reboot?) but the soft and hard limits are still 1024 and 4096 respectively.
Also when using the following command to check for "open files" for root user:
su - root -c 'ulimit -aHS' -s '/bin/bash'
I'm getting 1024 as well.
What does the soft and hard limit do and do I need to change them in order for the global limits to have any effect? And how about the user (root) limit?
Thanks!