{"id":431,"date":"2011-01-28T00:30:38","date_gmt":"2011-11-12T13:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/setting-the-max-number-of-file-descriptors-open-limit\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-11-12T13:51:50","slug":"setting-the-max-number-of-file-descriptors-open-limit","status":"publish","type":"post","link":"\/blog\/index.php\/setting-the-max-number-of-file-descriptors-open-limit\/","title":{"rendered":"Setting the max number of file descriptors open limit"},"content":{"rendered":"<p>To check kernel set open files limit<br \/>\n% cat \/proc\/sys\/fs\/file-max<br \/>\n8192<br \/>\nTo increase kernel set to 65535 (as root)<br \/>\n# echo &#8220;65535&#8221; &gt; \/proc\/sys\/fs\/file-max<br \/>\nIf you want this new value to survive across reboots add it to \/etc\/sysctl.conf<br \/>\nfs.file-max = 65535<br \/>\nYou can load these values live from the sysctl.conf file.<br \/>\n# sysctl -p \/etc\/sysctl.conf<br \/>\nThe previous settings will only be for root, we need to adjust some files for all<br \/>\nthe users to have them inherited.<br \/>\nTo increase this to 65535 for all users (as root)<br \/>\nadd two lines to \/etc\/security\/limits.conf<br \/>\nkraftek.html POSTS rescue rescued.html rescued.txt x y z soft nofile 65535<br \/>\nkraftek.html POSTS rescue rescued.html rescued.txt x y z hard nofile 65535<br \/>\nNow add the next entry to \/etc\/pam.d\/login<br \/>\nsession required \/lib\/security\/pam_limits.so<br \/>\nRelogin as your non-root user and check the new file open limit with:<br \/>\n$ ulimit -n<br \/>\n154\/433<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To check kernel set open files limit % cat \/proc\/sys\/fs\/file-max 8192 To increase kernel set to 65535 (as root) # echo &#8220;65535&#8221; &gt; \/proc\/sys\/fs\/file-max If you want this new value to survive across reboots add it to \/etc\/sysctl.conf fs.file-max = 65535 You can load these values live from the sysctl.conf file. # sysctl -p \/etc\/sysctl.conf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-431","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=431"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/431\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}