cat /proc/sys/fs/file-max
Quote from kernel docs:
The value in file-max denotes the maximum number of file- handles that the Linux kernel will allocate. When you get lots of error messages about running out of file handles,you might want to increase this limit.