{"id":1680,"date":"2017-10-26T10:02:42","date_gmt":"2017-10-26T09:02:42","guid":{"rendered":"https:\/\/hoover.gplrank.de\/?p=1680"},"modified":"2017-11-14T11:52:35","modified_gmt":"2017-11-14T10:52:35","slug":"increasing-the-number-of-open-files-for-mariadb-10-1-on-centos7","status":"publish","type":"post","link":"https:\/\/hoover.gplrank.de\/?p=1680","title":{"rendered":"Increasing the number of open files for MariaDB 10.1 on CentOS7 (openstack pike RDO install)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large\" src=\"https:\/\/www.stackhpc.com\/images\/openstack-pike-logo.png\" width=\"188\" height=\"293\" \/><\/p>\n<p>(c) stackhpc<\/p>\n<p>Our openstack pike installation crashed after a couple of days with tons of error messages in \/var\/log\/mariadb\/maria.log in the form of<\/p>\n<p><strong>Error in accept: Bad file descriptor<\/strong><\/p>\n<p>Some googling \u00a0hinted at mariadb running out of open files, but I had some problems getting to grips how to set the number of open files for mariadb 10.1.20 (used by the rdo openstack-pike) on a CentOS 7 system, so here&#8217;s for posterity:<\/p>\n<p>1)increase the ulimit in <strong>\/etc\/security\/limits.conf<\/strong> as usual:<\/p>\n<pre>* hard nofile 1024000\r\n* soft nofile 1024000<\/pre>\n<p>2) create the file (if it doesn&#8217;t exist, otherwise edit the existing file) <strong>\/etc\/systemd\/system\/mariadb.service.d\/limits.conf\u00a0<\/strong><\/p>\n<p>and add the following lines<\/p>\n<pre>[Service]\r\nLimitNOFILE=1024000<\/pre>\n<p>2a) reload systemd<\/p>\n<p><strong># systemctl daemon-reload<\/strong><\/p>\n<p>3) restart mariadb<\/p>\n<p><strong># systemctl restart mariadb.service<\/strong><\/p>\n<p>4) check the results<\/p>\n<p><strong># mysql -pXXXXXXXX mysql<\/strong><\/p>\n<pre>MariaDB [mysql]&gt; show global variables like 'open%';\r\n+------------------+---------+\r\n| Variable_name | Value |\r\n+------------------+---------+\r\n| open_files_limit | 1024000 |\r\n+------------------+---------+\r\n1 row in set (0.00 sec)<\/pre>\n<p>5) Enjoy a hopefully crash-free OpenStack Pike setup \ud83d\ude09<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(c) stackhpc Our openstack pike installation crashed after a couple of days with tons of error messages in \/var\/log\/mariadb\/maria.log in the form of Error in accept: Bad file descriptor Some googling \u00a0hinted at mariadb running out of open files, but I had some problems getting to grips how to set the number of open files [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1680","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/1680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1680"}],"version-history":[{"count":6,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/1680\/revisions"}],"predecessor-version":[{"id":1689,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/1680\/revisions\/1689"}],"wp:attachment":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}