Bug 1844972

Summary: Audit page render very slow when organization is set
Product: Red Hat Satellite Reporter: Hao Chang Yu <hyu>
Component: Audit LogAssignee: Hao Chang Yu <hyu>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7.0CC: ahumbe, arahaman, christian.klier, dhjoshi, egolov, inecas, jalviso, kgaikwad, mmccune, oezr, ramesh.daryani, rplevka, sadas, susalvi, tbrisker, wclark
Target Milestone: 6.10.0Keywords: Performance, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1962828 (view as bug list) Environment:
Last Closed: 2021-11-16 14:09:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hao Chang Yu 2020-06-08 07:29:25 UTC
Description of problem:
Audit page render very slow when organization is set even only 20 records per page.

2020-06-08T07:24:11 [I|app|6ec3a037] Started GET "/audits?page=1&per_page=20&search=" for 10.64.54.43 at 2020-06-08 07:24:11 +0000
2020-06-08T07:24:11 [I|app|6ec3a037] Processing by AuditsController#index as JSON
2020-06-08T07:24:11 [I|app|6ec3a037]   Parameters: {"page"=>"1", "per_page"=>"20", "search"=>""}
2020-06-08T07:24:43 [I|app|6ec3a037] Completed 200 OK in 32188ms (Views: 30.9ms | ActiveRecord: 30341.6ms)  <======== Took 32 seconds to load

# select count(*) from audits;
 count 
-------
 76620
(1 row)

# select count(*) from taxable_taxonomies where taxable_type = 'Audited::Audit';
 count  
--------
 125586

Comment 3 Ramesh Daryani 2021-02-24 07:44:09 UTC
Any update on this bug?  Today, I realized that post satellite 6.8.3 upgrade when I tried to load Monitor --> Audits it doesn't show any results and keep doing something at the backend.  If its a known issue with satellite 6.8.3 then please share.

Comment 8 Bryan Kearney 2021-03-31 16:05:36 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30053 has been resolved.

Comment 11 wclark 2021-05-19 23:29:48 UTC
HOTFIX is available for Satellite 6.8.6. To install the Hotfix, please follow the below instructions.

1. Since the Hotfix RPM is too large to be provided as a Bugzilla attachment, please open a case with Red Hat Technical Support to request the Hotfix RPM

2. Take a complete backup or snapshot of your Satellite server

3. Copy the Hotfix RPM to Satellite server

4. # rpm -Uvh --nodeps /root/foreman-2.1.2.26-2.HOTFIX_RHBZ_1844972.el7sat.noarch.rpm

5. # satellite-maintain service restart

Comment 13 Roman Plevka 2021-06-15 07:11:00 UTC
clearing the needinfo flag as this was addressed by comment #11

Comment 17 errata-xmlrpc 2021-11-16 14:09:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702

Comment 18 Red Hat Bugzilla 2023-09-15 00:32:33 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days