Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira ( 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 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 "", 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 1435809 - OOM kill Candlepin by updating a custom product on a very large pool
Summary: OOM kill Candlepin by updating a custom product on a very large pool
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.2.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: jcallaha
: 1441949 (view as bug list)
Depends On: 1435807
TreeView+ depends on / blocked
Reported: 2017-03-24 21:00 UTC by Barnaby Court
Modified: 2020-07-16 09:20 UTC (History)
12 users (show)

Fixed In Version: candlepin-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1435807
: 1446715 (view as bug list)
Last Closed: 2017-06-20 17:23:36 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1553 0 normal SHIPPED_LIVE Satellite 6.2.10 Async Bug Release 2017-06-20 21:19:07 UTC

Description Barnaby Court 2017-03-24 21:00:20 UTC
+++ This bug was initially created as a clone of Bug #1435807 +++

Description of problem:

Out of memory when updating a content set that is associated to a pool with very large numbers of entitlements:

This was found using candlepin-

2017-03-24 18:30:06,614 [thread=http-bio-8443-exec-3] [req=7a4c428e-9f46-45fe-b7ad-b796c9da3cb8, org=] WARN  org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 53200
2017-03-24 18:30:06,614 [thread=http-bio-8443-exec-3] [req=7a4c428e-9f46-45fe-b7ad-b796c9da3cb8, org=] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Ran out of memory retrieving query results.
2017-03-24 18:30:06,632 [thread=http-bio-8443-exec-3] [req=7a4c428e-9f46-45fe-b7ad-b796c9da3cb8, org=] ERROR org.candlepin.common.exceptions.mappers.CandlepinExceptionMapper - Runtime Error Ran out of memory ret
rieving query results.
org.postgresql.util.PSQLException: Ran out of memory retrieving query results.
        at org.postgresql.core.v3.QueryExecutorImpl.processResults( ~[postgresql-9.0-801.jdbc4.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute( ~[postgresql-9.0-801.jdbc4.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute( ~[postgresql-9.0-801.jdbc4.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags( ~[postgresql-9.0-801.jdbc4.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery( ~[postgresql-9.0-801.jdbc4.jar:na]
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery( ~[c3p0-]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.getResultSet( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.executeQueryStatement( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.executeQueryStatement( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.doQuery( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.Loader.loadCollection( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.loader.collection.CollectionLoader.initialize( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.persister.collection.AbstractCollectionPersister.initialize( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.internal.SessionImpl.initializeCollection( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.collection.internal.AbstractPersistentCollection.initialize( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.hibernate.collection.internal.PersistentSet.iterator( ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
        at org.candlepin.controller.CandlepinPoolManager.regenerateCertificatesOf( ~[CandlepinPoolManager.class:na]
        at ~[guice-persist-3.0.jar:na]
        at org.candlepin.controller.CandlepinPoolManager.regenerateCertificatesOf( ~[CandlepinPoolManager.class:na]
        at ~[guice-persist-3.0.jar:na]
        at org.candlepin.resource.ContentResource.updateContent( ~[ContentResource.class:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke( ~[na:1.7.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[na:1.7.0_131]
        at java.lang.reflect.Method.invoke( ~[na:1.7.0_131]

Comment 3 Chris Duryee 2017-03-30 14:24:20 UTC
time to alter URL on product without patch: 171 sec

with patch: 6 sec

Comment 4 Barnaby Court 2017-04-03 15:25:45 UTC
Fixed in Candlepin

Comment 5 Chris Duryee 2017-04-13 12:42:05 UTC
*** Bug 1441949 has been marked as a duplicate of this bug. ***

Comment 6 jcallaha 2017-06-01 14:04:44 UTC
Verified in Satellite 6.2.10 Snap 2.

I tested this on 5 total products, all of which were aligned to 25k content hosts. The time it took for changes to individual repositories varied from 2 to 8 seconds. The average completion time was right around 6 seconds.

Comment 8 errata-xmlrpc 2017-06-20 17:23:36 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.

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