Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2229788 - Memory Leak occurs when making repeated large queries against Pulpcore API service
Summary: Memory Leak occurs when making repeated large queries against Pulpcore API se...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.13.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.14.0
Assignee: satellite6-bugs
QA Contact: Shweta Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-07 16:40 UTC by wclark
Modified: 2023-11-08 14:21 UTC (History)
12 users (show)

Fixed In Version: pulpcore-3.22.9,pulpcore-3.28.5,pulpcore-3.21.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2231496 (view as bug list)
Environment:
Last Closed: 2023-11-08 14:20:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RHEL 8 Hotfix RPM for Satellite 6.13.3 (656.70 KB, application/x-rpm)
2023-08-10 18:50 UTC, Ian Ballou
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulpcore issues 2250 0 None closed Gunicorn consuming excessive amounts of memory 2023-08-22 13:49:11 UTC
Github pulp pulpcore pull 4090 0 None Merged Fix a significant memory leak 2023-08-07 16:40:07 UTC
Red Hat Issue Tracker SAT-19465 0 None None None 2023-08-09 16:29:49 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:21:23 UTC

Description wclark 2023-08-07 16:40:07 UTC
The issue occurs when making repeated large queries against the API service. The cache for the Pulpcore API access policy holds references to entire instances of views.

The caching mechanism for the Pulpcore API access policy was introduced in Pulpcore 3.20 and the first Satellite release in which it appears is Satellite 6.13.0

Comment 1 wclark 2023-08-07 17:10:14 UTC
I created this BZ as a spin-off from from 2122872 to avoid overloading that BZ, which was originally created for a Satellite version that did not have this issue, and already tracks fixes in other components (satellite-installer, via puppet-pulpcore)

Comment 2 Sayan Das 2023-08-08 11:18:37 UTC
I am not sure about what everyone else feels about handling this scenario via new BZ but even if we are tracking this just for the lru_cache fix, the BZ should be having Version set to 6.13.2 or 6.13.3 but not 6.14.0 .. 

This was an issue reported on 6.13 only by >= 4 customers for sure. 

And perhaps those cases should be identified from the other BZ and attached here as well.

Comment 4 Ian Ballou 2023-08-10 18:50:40 UTC
Created attachment 1982843 [details]
RHEL 8 Hotfix RPM for Satellite 6.13.3

A hotfix RPM is now available for Satellite 6.13.3 on RHEL 8.

Installation instructions:

1. Take a backup or snapshot of the Satellite server.

2. Download the hotfix RPM python39-pulpcore-3.21.9-2.HOTFIXRHBZ2229788.el8pc.noarch.rpm from the attachment.

3. # dnf install ./python39-pulpcore-3.21.9-2.HOTFIXRHBZ2229788.el8pc.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 9 Shweta Singh 2023-08-22 14:06:16 UTC
Verified.

Version Tested: Satellite 6.14.0 Snap 12.0

Verification Steps:
1. Enable few large repos and sync all at once. 
2. Monitor memory usage by pulpcore gunicorn process.

Result:
1. The spike in memory usage comes down once the syncing of repos get completed.
2. The caching has been removed from pulpcore.

Comment 13 errata-xmlrpc 2023-11-08 14:20:16 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 (Important: Satellite 6.14 security and bug fix update), 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-2023:6818


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