Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 4.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      User frozenfoxx in IRC reported an OOM upgrading from 4.0.0 to 4.2.1. We have traced it down to the migration of facts/resources data through the application for conversion to jsonb, here: https://github.com/puppetlabs/puppetdb/blob/master/src/puppetlabs/puppetdb/scf/migrate.clj#L1108

      Initially it seemed like the batch size of 500 might be the problem, but it looks like the JDBC functions we're using aren't actually behaving as expected, i.e this retains the head:

      (jdbc/with-transacted-connection my-db
        (sql/query my-db "select encode(resource::bytea, 'hex') as resource,
                           parameters from resource_params_cache"
                   :row-fn identity
                   :result-set-fn count))
      

      Potential impact here is failed upgrades to Davis due to OOM. I don't know whether PE handles that gracefully.

      The problem can be worked around by raising the heap until the upgrade succeeds, but the amount of heap required is dependent on the user's data and may or may not be available to them.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                wyatt Wyatt Alt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support