After upgrade from 22.04.7 to 22.10.1 the resource status page is locked by heavy queries

  • 13 November 2022
  • 9 replies
  • 178 views

Badge +4

Hi there,

After upgrading to 22.10.1, when we use resource staus page, the resource status query used by DbReadResourceRepository.php is taking longer than 2.5 minutes causing database queuing and topping database cpu

I thought it could be the way mysql handles the join queries, so we migrated from mysql 5.7 to mariadb 10.6.7, but it didnt make a difference to this query.

Does anyone have any tips

 


9 replies

Userlevel 5
Badge +13

Hi @kozfelipe , we didn’t know about this issue but Centreon support only MariaDB 10.5.x and not 10.6.x

Badge +4

Hi @kozfelipe , we didn’t know about this issue but Centreon support only MariaDB 10.5.x and not 10.6.x

hi @Laurent, indeed we should have migrated database longtime ago, but the issue still remains. We had to comment this query in order to maintain the database cpu causing resources page to be unavailable. This version works fine in our dev environment. Is there any diagnostic test to run?

Badge +4

note: when I remove LEFT JOIN parent_resource, the query runs instantly

Badge +4

fixed with a DBA indexing work

thanks for the attention

Badge +1

hi, Wich index have you added ?

We have the same issue.

Badge +4

@Mguerchet hi,

Even with the indexation work, the query became endless by the fact we have 100k entries at centreon_acl table. I ran tests in dev enviroiment with 250 lines and the query execution took almost 4 seconds, so we had to comment the ACL part of the query by replacing /usr/share/centreon/src/Core/Resources/Infrastructure/Repository/DbReadResourceRepository.php (line 297) $pattern content to empty

https://github.com/centreon/centreon/blob/develop/centreon/src/Core/Resources/Infrastructure/Repository/DbReadResourceRepository.php#L297

$pattern = ' ';

@Laurent have you ever seen the performance this version have for resources with 5k+ centreon_acl rows?

Userlevel 2
Badge +5

Hi,

Issue is currently being discussed by the backend PHP Team so that we can optimize the query when ACL are implied.

We are deeply sorry for the inconvenience on Resource Status page.

We’ll get back to you solution is up on the rails

Regards,

Adrien

Badge +1

hi @Adrien Morais-Mestre  do you have some news to optomimize this query ?

Userlevel 2
Badge +5

Hi,

This is still a work in progress. We are currently analyzing the request and were able to reproduce the issue.

It needs know some time to find the best solution.

Stay tuned.

Regards,

Adrien

Reply