Bug 1491798 - Extremely slow /api/v2/hosts, 200hosts/page takes about 40s to display
Summary: Extremely slow /api/v2/hosts, 200hosts/page takes about 40s to display
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Roman Plevka
Depends On:
TreeView+ depends on / blocked
Reported: 2017-09-14 17:29 UTC by Justin Sherrill
Modified: 2019-04-01 20:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20508 0 'Normal' 'Closed' 'Extremely slow /api/v2/hosts, 200hosts/page takes about 40s to display' 2019-11-11 14:06:38 UTC

Description Justin Sherrill 2017-09-14 17:29:28 UTC
I noticed this when l try to pull up the content hosts view or when I was using the foreman plugin for ansible.

In short, the @/api/v2/hosts@ call takes a very long time. With jsherril's help I've extracted some debug logs (attached). It looks like most of the SQL time is spent in lookups to rpms and errata with some more in reports.

Comment 1 Justin Sherrill 2017-09-14 17:29:33 UTC
Created from redmine issue http://projects.theforeman.org/issues/20508

Comment 2 Justin Sherrill 2017-09-14 17:29:37 UTC
Upstream bug assigned to jsherril@redhat.com

Comment 3 Justin Sherrill 2017-09-14 17:31:16 UTC
suggesting for 6.3, as it should help performance on the hosts api and pages.

Comment 5 Satellite Program 2017-09-19 14:03:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20508 has been resolved.

Comment 6 Satellite Program 2018-02-21 16:54:37 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, 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-2018:0336

Note You need to log in before you can comment on or make changes to this bug.