{"id":6160,"date":"2019-07-11T12:05:58","date_gmt":"2019-07-11T12:05:58","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=6160"},"modified":"2025-05-04T06:08:21","modified_gmt":"2025-05-04T06:08:21","slug":"elastic-search-error-max-file-descriptors-4096-for-elasticsearch-process-is-too-low-increase-to-at-least-65535","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/elastic-search-error-max-file-descriptors-4096-for-elasticsearch-process-is-too-low-increase-to-at-least-65535\/","title":{"rendered":"Elastic Search Error &#8211; max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]"},"content":{"rendered":"\n<p>Elastic Search Error &#8211; max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">&#91;2019-07-11T10:55:11,630]&#91;INFO ]&#91;o.e.t.TransportService   ] &#91;es-client01] publish_address {172.31.11.126:9300}, bound_addresses {172.31.11.126:9300}\n&#91;2019-07-11T10:55:11,637]&#91;INFO ]&#91;o.e.b.BootstrapChecks    ] &#91;es-client01] bound or publishing to a non-loopback address, enforcing bootstrap checks\nERROR: &#91;2] bootstrap checks failed\n&#91;1]: max file descriptors &#91;4096] for elasticsearch process is too low, increase to at least &#91;65535]\n&#91;2]: max virtual memory areas vm.max_map_count &#91;65530] is too low, increase to at least &#91;262144]\n<\/code><\/span><\/pre>\n\n\n<p><strong>Solution<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Temporary to the current login session<\/strong><br> To set ulimit value on a parameter use the below command.<br> $ ulimit -p 65535<\/p><\/blockquote>\n\n\n\n<p><strong>Persistent limits can be set for a particular user &#8211; <\/strong>By editing the \/etc\/security\/limits.conf file. To set the maximum number of open files for the elasticsearch user to 65,536, add the following line to the limits.conf file:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">vi \/etc\/security\/limits.conf\n------\nec2-user  -  nofile  <span class=\"hljs-number\">65535<\/span>\n----\n\n<span class=\"hljs-comment\">#This change will only take effect the next time the ec2-user user opens a new session.<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/gerardnico.com\/os\/linux\/limits.conf<br><\/li><li>https:\/\/www.thegeekdiary.com\/understanding-etc-security-limits-conf-file-to-set-ulimit\/<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Elastic Search Error &#8211; max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] Solution Temporary to the current login session To set ulimit value on a parameter use the below command. $ ulimit -p 65535 Persistent limits can be set for a particular user &#8211; By editing the \/etc\/security\/limits.conf&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6233,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[5936],"tags":[5227,95,4666,258,5226,593,1795,104],"class_list":["post-6160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-elastic","tag-descriptors","tag-devops","tag-elasticsearch","tag-error","tag-max-file","tag-process","tag-troubleshoot","tag-tutorials"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=6160"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6160\/revisions"}],"predecessor-version":[{"id":6163,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6160\/revisions\/6163"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/6233"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=6160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=6160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=6160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}