Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18410

Can't set mysqld_safe's open-files-limit to unlimited

    XMLWordPrintable

    Details

      Description

      The value provided for mysqld_safe's open-files-limit option gets passed right to "ulimit" here:

        if test -n "$open_files"
        then
          ulimit -n $open_files
        fi
      

      https://github.com/MariaDB/server/blob/c2318291be7458238729ed80233ea71f1e6a62b8/scripts/mysqld_safe.sh#L709

      The "ulimit" command accepts the special value of "unlimited" to represent no limit:

      https://ss64.com/bash/ulimit.html

      So it would make sense to be able to do the following:

      [mysqld_safe]
      open_files_limit=unlimited
      

      However, this doesn't currently work because mysqld_safe appends its own value of open-files-limit to the list of arguments for mysqld here:

      if test -n "$open_files"
      then
        append_arg_to_args "--open-files-limit=$open_files"
      fi
      

      https://github.com/MariaDB/server/blob/c2318291be7458238729ed80233ea71f1e6a62b8/scripts/mysqld_safe.sh#L715

      And since mysqld expects a numeric value for this option, it causes an error:

      190128 23:27:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
      Unknown suffix 'u' used for variable 'open_files_limit' (value 'unlimited')
      2019-01-28 23:27:41 139683855239360 [ERROR] //sbin/mysqld: Error while setting value 'unlimited' to 'open_files_limit'
      

      https://mariadb.com/kb/en/library/server-system-variables/#open_files_limit

      Maybe this should be changed, so that:

      • If open-files-limit=unlimited, mysqld_safe does not pass the value to mysqld.
        or
      • If open-files-limit=unlimited, mysqld_safe passes open_files_limit=4294967295 to mysqld instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cvicentiu Vicențiu Ciorbaru
              Reporter:
              GeoffMontee Geoff Montee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: