Bulk service deletion using api very slow ?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Bulk service deletion using api very slow ?

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk service deletion using api very slow ?

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked