Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-4444

PuppetDB never finishes migrating resource_events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PuppetDB
    • Labels:
      None
    • Template:
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      In our environment, a PuppetDB upgrade never completes - any schema migrations that touch `resource_events` always take too long (over 12+ hours).  The PuppetDB JVM either crashes OOM, or I give up, kill it, and truncate `resource_events` and start it again.

      This is the migration query that is running:

      INSERT INTO resource_events_transform ( new_value, corrective_change, property, file, report_id, event_hash, old_value, containing_class, certname_id, line, resource_type, status, resource_title, timestamp, containment_path, message ) VALUES ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16 )+

      I'm not sure there's any way to solve this... `resource_events` is by far the largest table, usually around 3-5 million rows.  I've already disabled report processing on our Dev infrastructure to limit the amount of reports stored.

      Any suggestions, or should I make it practice to truncate this table before every package upgrade?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lukebigum Luke Bigum
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support