How to Increase timeout for contacts-page?

Hi,

we have little problem with timeouts regarding the query of contact groups:

If we call https://myhost.example/icingaweb2/monitoring/list/contacts?contactgroup_name=my-example-group I experience 60 seconds of waiting before I get a “504 Gateway Timeout” from Icingaweb.

We checked the duration of the corresponding Queries in our MariaDB (GaleraCluster), and those take about 2.5 minutes.

So basically something is causing a timeout before the answer is ready from the database.

Question: How to increase that timeout?

I already noticed that it is a bad response time, but that feature is rarely used by our users, so we would live with that.

  • Web browser used: Confirmed with Chrome & Edge
  • Icinga Web 2 version and modules (System - About): 2.11.4
  • Icinga 2 version (icinga2 --version): 2.13.5-1
  • Operating System and version: RHEL 8.5.0-10 / Linux Kernel 4.18.0
  • Webserver, PHP versions: Apache 2.4.37 / PHP 8.0.13

We figured out the root cause might be due to a lot of COLLATE’s in the SQL statment due to some old encodings in our database. We’ll fix that.

Did it solve the problem?

I have a similar one, from just clicking the basic “Contactgroups” menu option under “Overview”. Seems the query gets too heavy and times out.

I’m running on the IDO PostgreSQL backend, with what I believe are the recommended settings (en_US.UTF-8).

Maybe do a clean up of the database?
https://icinga.com/docs/icinga-2/latest/doc/14-features/#db-ido-cleanup
https://icinga.com/docs/icinga-db/latest/doc/03-Configuration/#retention

Considering what the SQL query that times out looks like, that does seem like a plausible way to get the execution time down. Thanks. I’ll try it out.

I thought from the docs it would clean out old items from icinga_objects, but apparently it cleans nothing of what’s included in the relevant SQL query. And that table isn’t very big for us anyway. About 20.000 rows. Might be good to clean some state and notification history regardless though.

The thing is, I get fairly absurde values for contact_count in that SQL query: In the order of 70 million. With about 10.000 services, 500 hosts, 100 users and less than 100 of any of the groups. So seems to me something turns out wrong in that query. Havn’t been able to figure out exactly what yet.

The cleanup items:

https://icinga.com/docs/icinga-2/latest/doc/09-object-types/#idopgsqlconnection

Tried a new Icinga installation, with no history and no objects with is_active=0. Exactly the same issue, so at least we can completely rule out that cleaning the DB can fix anything. It’s something with the configuration.

Looks like it needs to be escalated out of the forum into a GitHub issue.