Could not increase number of max_open_files to more than 1024

Yoon Kim
1 min readFeb 2, 2017

It was working well, but suddenly, got logs below after Mysql server was restarted. (Mysql 5.7.x / Ubuntu 16.04.1 LTS)

2017–02–02T18:43:34.631640Z 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 8192)
2017–02–02T18:43:34.631693Z 0 [Warning] Changed limits: max_connections: 214 (requested xxxx)
2017–02–02T18:43:34.631699Z 0 [Warning] Changed limits: table_open_cache: 400 (requested xxxx)

What I’ve done to solve this issue;

sudo vi /lib/systemd/system/mysql.service
--
Add LimitNOFILE and LimitMEMLOCK under [Service] section
[Service]
.....
LimitNOFILE=xxxx
LimitMEMLOCK=xxx
--
sudo systemctl daemon-reload
sudo systemctl mysql

Then the issue was gone.

https://bugs.mysql.com/bug.php?id=78102

--

--