Page 2 of 2
Re: Bulk service deletion using api very slow ?
Posted: Fri Nov 02, 2018 6:17 pm
by vishfx
As per ,
https://support.nagios.com/kb/article/n ... s-513.html
It has been observed that MariaDB can only have it's max_connections= set to a maximum of 818. If you use any value greater MariaDB will default back to a value of 214. In the steps below if you are using MariaDB you should use 818 instead of 1000.
So looks like max is 818
Regards,
Vish.
Re: Bulk service deletion using api very slow ?
Posted: Mon Nov 05, 2018 10:10 am
by lmiltchev
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