sysctl -w fs.file-max=100000
After the above approaches, when you check the value using the following, the value will show up.
However, setting the values as root, does not change the values for other regular users. To set it specifically for any user, change the value in
/etc/security/limits.conffile. Setting only the soft or hard limit will not be sufficient. Therefore, the following lines should be added.
<user> soft nofile <value>
<user> hard nofile <value>
After the modifications, it is required to logout and log back into the system.