title: cannot increase open-files-limit in mariadb 10 on centos7
body: <p>I searched about the topic subject and tested options, but I still cant increase the open-files-limit on my mariadb server that is used as remote database server for cpanel/whm server.
  here is s good reference
  <a href="http://duntuk.com/how-raise-ulimit-open-files-and-mysql-openfileslimit" rel="nofollow">http://duntuk.com/how-raise-ulimit-open-files-and-mysql-openfileslimit</a></p>
  
  <p>I increased it in </p>
  
  <pre><code>/etc/my.cnf 
  
  open-files-limit=65550
  </code></pre>
  
  <p>here is some results</p>
  
  <pre><code>#ulimit -a 
      core file size          (blocks, -c) 0
      data seg size           (kbytes, -d) unlimited
      scheduling priority             (-e) 0
      file size               (blocks, -f) unlimited
      pending signals                 (-i) 63471
      max locked memory       (kbytes, -l) 64
      max memory size         (kbytes, -m) unlimited
      open files                      (-n) 65535
      pipe size            (512 bytes, -p) 8
      POSIX message queues     (bytes, -q) 819200
      real-time priority              (-r) 0
      stack size              (kbytes, -s) 8192
      cpu time               (seconds, -t) unlimited
  </code></pre>
  
  <p>max user processes              (-u) 65535
  virtual memory          (kbytes, -v) unlimited
  file locks                      (-x) unlimited</p>
  
  <pre><code>#ulimit -Hn -Sn                              
  open files                      (-n) 65535
  open files                      (-n) 65535
  
  cat /etc/systemd/system/mariadb.service.d/limits.conf 
  [Service]
  LimitNOFILE=65500
  
  cat /usr/lib/systemd/system/mariadb.service
  
  [Unit]
  Description=MariaDB database server
  After=syslog.target
  After=network.target
  
  [Service]
  Type=simple
  User=mysql
  Group=mysql
  LimitNOFILE=infinity
  LimitMEMLOCK=infinity
  </code></pre>
  
  <p>and still in mysql I get</p>
  
  <p>show global variables like 'open%';</p>
  
  <p>+------------------+-------+</p>
  
  <p>| Variable_name    | Value |</p>
  
  <p>+------------------+-------+</p>
  
  <p>| open_files_limit | 1024  |</p>
  
  <p>+------------------+-------+</p>
  
  <p>1 row in set (0.00 sec)</p>
  
  <p>and im getting following error over and over after restart</p>
  
  <pre><code>60108 16:30:02 [ERROR] mysqld: Can't open file: './username_wp/wp_users.frm' (errno: 24)
  160108 16:30:02 [ERROR] Error in accept: Too many open files
  160108 16:30:04 [ERROR] Error in accept: Too many open files
  160108 16:30:06 [ERROR] Error in accept: Too many open files
  160108 16:30:11 [ERROR] mysqld: Can't open file: './username_db/strikes.frm' (errno: 24)
  </code></pre>
  
  <p>and here is the startup log of mariadb</p>
  
  <pre><code>[Warning] Could not increase number of max_open_files to more than 1024 (request: 132107)
  </code></pre>