Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not increase number of max_open_files to more than 4096 (request: 4214)

I have MariaDB + Nginx on Linux Debian 9(stretch). After installing MariaDB it and trying to start it, I got the error saying: [Warning] Could not increase number of max_open_files to more than 4096 (request: 4214). So I googled it and it told me that I should change LimiNOFILE to 10000 in /etc/systemd/system/mysql.service. I did that, did deamon-reload and it did absolutely nothing. I am still getting the same error message. I tried reinstalling MariaDB but that didn't help either. I also added LimitMEMLOCK=10000 at the very end of my file, that didn't change anything.

Full traceback:

Link

Thank you in advance

like image 256
Akutasan Avatar asked Feb 16 '20 13:02

Akutasan


1 Answers

I solved it by reinstalling MariaDB with

$ sudo apt-get purge mariadb-server

And you should check if it's still on the system with:

$ sudo dpkg -l | grep mariadb

And if it is, do:

$ sudo apt-get purge mariadb-common

But before doing that I killed everything that had to do with MariaDB/MySQL via htop. And then the standart procedure with installing it:

$ sudo apt update

$ sudo apt install mariadb-server

$ sudo mysql_secure_installation

like image 140
Akutasan Avatar answered Sep 22 '22 10:09

Akutasan