Skip to main content
Enterprise applications

open_file_limits

Contributors jfsinmsp

The open_file_limits parameter determines the number of files that the operating system permits mysqld to open.

The value of this parameter at run time is the real value permitted by the system and might be different from the value you specify at server startup. The value is 0 on systems where MySQL cannot change the number of open files. The effective open_files_limit value is based on the value that is specified at the system startup (if any) and the values of max_connections and table_open_cache by using these formulas:

  • 10 + max_connections + (table_open_cache x 2)

  • max_connections x 5

  • Operating system limit if positive

  • If the operating system limit is infinity: open_files_limit value is specified at startup; 5,000 if none

The server attempts to obtain the number of file descriptors using the maximum of these four values. If that many descriptors cannot be obtained, the server attempts to obtain as many as the system will permit.