{"id":7494,"date":"2023-01-19T12:23:01","date_gmt":"2023-01-19T03:23:01","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=7494"},"modified":"2023-01-19T13:49:32","modified_gmt":"2023-01-19T04:49:32","slug":"too-many-open-files","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=7494","title":{"rendered":"Too many open files"},"content":{"rendered":"<h1>Too many open files<\/h1>\n<p><a href=\"https:\/\/blog.hbsmith.io\/too-many-open-files-%EC%97%90%EB%9F%AC-%EB%8C%80%EC%9D%91%EB%B2%95-9b388aea4d4e\">\ucc38\uc870<\/a><\/p>\n<p>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<\/p>\n<h2>\ud30c\uc77c \uc624\ud508 \uc81c\ud55c<\/h2>\n<ul>\n<li>\n<p>\uc2dc\uc2a4\ud15c\uc774 \uc5f4\uc218 \uc788\ub294 \ud30c\uc77c \uc624\ud508 \uac2f\uc218<\/p>\n<p>\uc774 \ud30c\uc77c \uac2f\uc218\ubcf4\ub2e4 \ub354 \ub9ce\uc740 \ud30c\uc77c \uc218\ub97c \uc124\uc815\ud558\uba74 \uc2dc\uc2a4\ud15c\uc5d0 \uc2ec\uac01\ud55c \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud55c\ub2e4.<\/p>\n<\/li>\n<li>\n<p>\ub8e8\ud2b8 \uacc4\uc815\uc774 \uc124\uc815\ud560 \uc218 \uc788\ub294 \ud30c\uc77c \uc624\ud508 \uac2f\uc218<\/p>\n<p>\ub8e8\ud2b8\ub294 \uc790\uc720\ub85c\uc774 \ud30c\uc77c \uac2f\uc218\ub97c \uc124\uc815\ud560 \uc218\uc788\uc9c0\ub9cc, \uc2dc\uc2a4\ud15c\uc774 \ud5c8\uc6a9\ud558\ub294 \ud30c\uc77c\uac2f\uc218\ubcf4\ub2e4\ub294 \uc801\uac8c \uc124\uc815\ud574\uc57c \ud55c\ub2e4.<\/p>\n<\/li>\n<li>\n<p>\uc77c\ubc18 \uc720\uc800\uac00 \uc124\uc815\ud560 \uc218 \uc788\ub294 \ud30c\uc77c \uc624\ud508 \uac2f\uc218<\/p>\n<\/li>\n<li>\n<p>\ud504\ub85c\uc138\uc2a4\uc758 \ud30c\uc77c \uc624\ud508 \uac2f\uc218<\/p>\n<p>user \uc758 \ud30c\uc77c \uc624\ud508 \uac2f\uc218\ub97c \ub298\ub824\uc57c \ud504\ub85c\uc138\uc2a4\uc758 \ud30c\uc77c \uc624\ud508 \uac2f\uc218\ub3c4 \ub298\ub9b4 \uc218 \uc788\ub2e4.<\/p>\n<\/li>\n<\/ul>\n<h2>Soft Limit \/ Hard Limit<\/h2>\n<ul>\n<li>\n<p>Soft Limit<\/p>\n<p>\uc77c\ubc18 \uc720\uc800\ub3c4 \uc124\uc815\ud560 \uc218 \uc788\ub2e4. \ud558\uc9c0\ub9cc Hard Limit \uc744 \ub118\uc744 \uc218\ub294 \uc5c6\ub2e4.<\/p>\n<\/li>\n<li>\n<p>Hard Limit<\/p>\n<p>\ub8e8\ud2b8 \uacc4\uc815\ub9cc \uc124\uc815\uac00\ub2a5\ud558\ub2e4.<\/p>\n<\/li>\n<\/ul>\n<h2>\ud655\uc778 \ubc0f \uc124\uc815<\/h2>\n<h2>\uc2dc\uc2a4\ud15c \uc81c\ud55c<\/h2>\n<pre><code class=\"language-bash\">cat \/proc\/sys\/fs\/file-max\n13122874<\/code><\/pre>\n<h2>\ub8e8\ud2b8\uc758 \uc124\uc815\ubc29\ubc95<\/h2>\n<pre><code class=\"language-bash\">sudo vi \/etc\/security\/limits.conf\n......\n* hard nofile 500000\n* soft nofile 500000\nroot hard nofile 500000\nroot soft nofile 500000\n......<\/code><\/pre>\n<h3>\uc77c\ubc18 \uc720\uc800 \ud655\uc778\ubc29\ubc95<\/h3>\n<pre><code class=\"language-bash\">ulimit -Hn\nulimit -Sn<\/code><\/pre>\n<p>\ub8e8\ud2b8 \uc720\uc800\uac00 \uc124\uc815\ud574\uc8fc\uba74 \ub85c\uadf8\uc544\uc6c3 \ud588\ub2e4\uac00 \ub2e4\uc2dc \ub85c\uadf8\uc778\ud55c\ub2e4.<\/p>\n<h3>\ud504\ub85c\uc138\uc2a4 \ud655\uc778\ubc29\ubc95<\/h3>\n<p>prlimit \uc774 \uc2e4\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc73c\uba74 \uc544\ub798 \uba85\ub839\uc744 \uc2e4\ud589\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-bash\"># yum install util-linux\nsudo apt -y install util-linux<\/code><\/pre>\n<pre><code class=\"language-bash\">ps -ef | grep foobar\nprlimit --nofile --output RESOURCE,SOFT,HARD --pid 1234<\/code><\/pre>\n<pre><code class=\"language-bash\">prlimit --nofile=500000 --pid=1234<\/code><\/pre>\n<pre><code class=\"language-bash\">prlimit --nofile --output RESOURCE,SOFT,HARD --pid 1234<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Too many open files \ucc38\uc870 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=7494\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-7494","post","type-post","status-publish","format-standard","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/7494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7494"}],"version-history":[{"count":2,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/7494\/revisions"}],"predecessor-version":[{"id":7496,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/7494\/revisions\/7496"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}