View previous topic :: View next topic |
Author |
Message |
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Thu Aug 09, 2018 2:49 pm Post subject: MariaDB, too many files open |
|
|
Example
Code: | > SELECT * FROM users;
ERROR 1030 (HY000): Got error 24 "Too many open files" from storage engine TokuDB |
Ok, presumably this is because I recently imported a new DB, and now the number of files the server keeps open exceeds 1024, (one file per table).
Lets drop some old stuff I don't need:
Code: | > drop database [db_name];
ERROR 1030 (HY000): Got error 24 "Too many open files" from storage engine MyISAM |
Well that's annoying. So lets try to raise the limit:
Code: | $ grep "^user" /etc/mysql/my.cnf
user = mysql
$ grep mysql /etc/security/limits.conf
mysql soft nofile 2048
$ sudo /etc/init.d/mysql restart
$ cat /proc/1339/limits | grep open
Max open files 1024 4096 files
|
No dice. Some googling suggests this might be PAM related, but I haven't been able to figure out just how yet. |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Thu Aug 09, 2018 3:22 pm Post subject: |
|
|
Just doing a quick search, I found this: https://mariadb.com/kb/en/library/cannot-increase-open-files-limit/
One thing it mentioned, is even if you are not using systemd ; some systemd config files are overwriting the service's configs (the joys of having systemd using their own configs instead of the standard config locations). |
|
Back to top |
|
|
Letharion Veteran
Joined: 13 Jun 2005 Posts: 1344 Location: Sweden
|
Posted: Fri Aug 10, 2018 9:28 am Post subject: |
|
|
Thanks, I couldn't get any where with either of those answers, or similar searches I made myself. I ended up doing a temporary solution.
Code: | sudo su
ulimit -n 9999
/etc/init.d/mysql restart |
This way mysql inherited the shells new limit, and I could delete from of the old DBs I didn't need. It's not a great solution as the next time it restart it'll have it's old settings back, but it allowed me to do what I needed for now. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|