Bug 2096198 - Too many connection issue occurring for on-demand content sync
Summary: Too many connection issue occurring for on-demand content sync
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-13 09:19 UTC by Lai
Modified: 2022-07-05 14:36 UTC (History)
6 users (show)

Fixed In Version: tfm-pulpcore-python-pulpcore-3.16.9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:35:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulpcore issues 2816 0 None open on-demand content results in unclosed, idle, database connections 2022-06-13 13:04:02 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:36:07 UTC

Description Lai 2022-06-13 09:19:44 UTC
Description of problem:
When trying to bulk sync on-demand content, the database connection remains open and causes a "500, message='Internal Server Error".  You can look at https://bugzilla.redhat.com/show_bug.cgi?id=2062526 for more info on the diagnostic of the issue.

Version-Release number of selected component (if applicable):
6.11 snap 22

How reproducible:
100%

Steps to Reproduce:
Note: Ensure Capsule is setup to have 8 pulpcore workers

1) Enable and sync a large Red Hat repository. I use "Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server" in my reproducer and that it's "on demand"
2) Set the Capsule download policy to "immediate".
3) Create a new lifecycle environment named 'devel'. Add only it to the Capsule. Remove all other lifecycle environments from the Capsule.
4) In Settings page, Content tab, set "Sync Capsules after Content View promotion" to "No"
5) Create 1 content view and attach repo in step (1) to it.
6) Make 7 copies of the content view.
7) Publish and promote all 8 content views to 'devel' environment.
8) Trigger a complete capsule sync.

Actual results:
500, message='Internal Server Error', url=URL('https:<sat-url>/pulp/content/Default_Organization/devel/cv/content/dist/rhel/server/7/7Server/x86_64/rhscl/1/os/Packages/d/devtoolset-7-libstdc%2B%2B-docs-7.3.1-5.15.el7.x86_64.rpm')

Expected results:
sync should be successful

Additional info:

Comment 11 jcallaha 2022-06-16 15:02:49 UTC
Grant,
    Thanks for the help on this one! Just to be sure (since that repo was still on-demand but involved in previous syncs that would pull all content), I added a new on-demand RH repo to the content view/environment that the capsule is aligned to and performed another complete sync.
    
    That sync also completed successfully! c9bda319-1312-4c74-8183-949da8fe6e43
    With that in mind

Verified in Satellite 6.11 Snap 26

Comment 14 errata-xmlrpc 2022-07-05 14:35:58 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.11 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-2022:5498


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