Good day! I ran into a problem when backing up all my virtualMIN websites. When the backup failed something stange happened to MySQL “MariaDB” database server. When backup fail, MariaDB crash!
To fix this issue I added a command to run after backup:
systemctl stop mariadb ; systemctl start mariaDB
Located in > VirtualMIN > Scheduled Backups >
This will prevent mariaDB to crash after a failed virtualMIN backup!
Notes: Check the size of your /tmp and increase it!
If you are having “Out of resources Errcode : 24 message”
The mysql error: Out of resources when opening file… (Errcode: 24) indicates that the number of files that msyql is permitted to open has been exceeded.
This limit is controlled by the variable open_files_limit. You can read this in phpMyAdmin (or the MySQL command line utility) with the statement:
To set this variable to a higher number, edit the /etc/my.cnf file and add the lines:
[mysqld] open_files_limit = 5000
Then be sure to restart mysql with: sudo /etc/init.d/mysql restart
Remember to use the server administrative account and sudo when you edit the file. The choice of editor is up to you.
Now, showing the variable should show the number you choose.
Note that 5000 shown above is an example. A good rule of thumb is to take the current number of files and add 1000 to it. If this doesn’t help, add some more. This number affects the amount of memory that MySQL uses, so setting it to a very high number is not a good idea.
You may also verified your /etc/my.cfg configurations:
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
innodb_file_per_table = 1
thread_concurrency = 8
query_cache_size = 64M
thread_cache_size = 8
myisam_sort_buffer_size = 256M
read_rnd_buffer_size = 32M
read_buffer_size = 4M
sort_buffer_size = 4M
table_open_cache = 512
max_allowed_packet = 7M
key_buffer_size = 512M
open_files_limit = 10000
max_connections = 32768
innodb_buffer_pool_size = 40M
After modifications you must restart MySQL server
# systemctl restart mariadb