In the same way that we have a maximum open file limit for sessions and processes, the kernel itself has a limit for the maximum open file descriptors across the whole system. If this limit is reached, no other files will be able to be opened, and thus this needs tweaking on machines that may have a large number of files open at any one time.
This value is part of the kernel parameters and as such can be seen with sysctl:
$ sysctl fs.file-max
fs.file-max = 757778
While on this machine the value seems reasonable, I have seen a few older distributions with a surprisingly low value that will get easily hit with errors if you are running a number of containers on the system.
To change this to a value that will persist across reboots, we will need to add the following to the /etc/sysctl.d folder (that is, /etc/sysctl.d/10-file-descriptors-increase.conf):
fs.file-max = 1000000
After this change, reboot, and you should now be able to open up to 1 million file handles on the machine!