Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-65372

Audit log searches fail when audit_log table is large

XMLWordPrintable

      Symptoms

      When the audit_log grows very large (24 million+ rows in my testing) searching the audit log (System -> Troubleshooting and Support -> Audit Log) for specific text or date ranges will fail with a message stating "There was an error loading data".

      Steps to Reproduce

      Generate 24 million rows of audit log data, e.g.:

      INSERT INTO audit_log (id, remote_address, created, author_key, summary, category, object_type, object_id, object_name, object_parent_id, object_parent_name, author_type, event_source_name, description, long_description, search_field)
      SELECT x.id, '10.0.0.1', '2017-01-01 07:35:11', '', 'Group created', 'group management', 'GROUP', '', 'jira-software-users', '1', 'JIRA Internal Directory', 0, '', '', '', '10.0.0.1 group created management jira-software-users jira internal directory' || x.id
      FROM generate_series(200000,24200000) AS x(id);

       

      Then attempt to search for a date range or a specific string.

      Additional Detail

      The audit log table can rapidly grow quite large due to JRASERVER-39094. While that issue is now corrected the past audit log entries are already present in the table.

      Workaround

      Problem is mitigated with auditing improvements made in Jira 8.8

      • Truncate the audit_log table to fewer than 24 million rows.
      • See other workarounds in JRASERVER-67985

       

              Unassigned Unassigned
              troyall TJ Royall
              Votes:
              17 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: