I am not sure what was the mariadb version, that this KB article was written for, but this is "version specific". I was checking out the max connections in mariadb, and found this article:
https://mariadb.com/kb/en/library/serve ... onnections
Having said that, let's step back and check few other things. How slow is the service deletion exactly? Have you timed it? Can you run your service deletion loop with the "time" command on the front, and tell us how long it took to run the command?
Also, let's check some of your resource settings. Run the following commands and show the output:
Code: Select all
grep max_input_vars /etc/php.ini
cat /proc/$(pidof mysqld)/limits | grep "Max open files"
grep kernel /etc/sysctl.conf
The issue may be caused by hitting the file limit. If this is the case, you can try the following "workaround". Create a file named /etc/systemd/system/mariadb.service.d/limits.conf with the following contents:
Code: Select all
[Service]
You can time your service deletion loop before and after implementing this workaround to see if it is going to make a difference.
LimitNOFILE=16384
then run:
Code: Select all
systemctl daemon-reload
systemctl restart mariadb