You are here
Could not increase number of max_open_files
Sun, 2014-12-28 15:37 — oli
Hello all,
on some Linux systems I get the following warning during my MySQL database start-up:
What does it mean and is that something I should care about?
[Warning] Buffered warning: Could not increase number of max_open_files to more than 1024 (request: 8192) [Warning] Buffered warning: Changed limits: max_connections: 214 (requested 505) [Warning] Buffered warning: Changed limits: table_cache: 400 (requested 512)
What does it mean and is that something I should care about?
Taxonomy upgrade extras:
max_open_files
Hello oli,
every user/process on a UNIX system has some user limits. There are some soft (S) and hard (H) user limits. Soft limits a user can change himself up to the hard limits.
You can find you own user limits as follows:
and the user limits of an already running process as follows:
Unfortunately all common Linux distributions nowadays have too small Max open files hard limit for database systems (also true for Oracle, PostgreSQL and others).
The number of open files your MySQL database should use you can set with the following variable in your
my.cnf
:Now it looks like MySQL does NOT increase the soft limit to the maximum possible (4096) if it fails to increase the wanted value (8192) but just uses the soft limit (1024).
For database system we advice you to increase your open files user limit to at least 8192 or 16384 file handles. Oracle even recommends to set this value to 64k!
This has to be done as follows:
the total allocated (1), currently unused (2) and maximum file handles (3, same as
file-max
) can be shown as follows:And yes: You should care about this setting because it limits your database and has a direct impact on database performance.