Hi all,
I have a problem with daily backup and open_files_limit.
- The problem happens only once in a while.
Aug 28 03:00:37 dorgee esmith::event[29767]: mysqldump: Couldn't execute 'show fields from `BouMN_woocommerce_shipping_zone_locations`': Out of resources when opening file '/var/tmp/#sql_770_0.MAI' (Errcode: 24 "Too many open files") (23)
Aug 28 03:00:37 dorgee esmith::event[29767]: Action: /etc/e-smith/events/pre-backup-data/S50rh-mariadb102-dump-tables FAILED: 1 [11.164038]
Aug 28 03:00:37 dorgee esmith::event[29767]: Event: pre-backup-data FAILED
Inside the Mariadb102 console:
# mysql102
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 9455
Server version: 10.2.22-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]> show global variables like 'open%';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 1024 |
+------------------+-------+
1 row in set (0,01 sec)
MariaDB [(none)]>
I would like to increase the limit to 2048.
I tried to include it in /etc/opt/rh/rh-mariadb102/my.cnf
.
# Added 2020-08-29_11h27
open_files_limit = 2048
# Added 2020-08-29_11h27
[mysqld_safe]
open_files_limit = 2048
Then restarted Mariadb102
# systemctl restart rh-mariadb102-mariadb.service
#
But the limit is still at 1024:
MariaDB [(none)]> show global variables like 'open%';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 1024 |
+------------------+-------+
1 row in set (0,00 sec)
MariaDB [(none)]>
There is a file /etc/opt/rh/rh-mariadb102/my.cnf.d/mariadb-server.cnf
.
QUESTION:
- Do I have to make a custom-template and include the limit in it instead of in /etc/opt/rh/rh-mariadb102/my.cnf
?
- Is there another way ?
- Will this affect the number of connections ?
All suggestions appreciated,
Michel-André