When the audits record deletion expires it also cleans up the taxonomies table. Neither of these deletes are “batched” through the rails command: https://github.com/theforeman/foreman/blob/develop/lib/tasks/audits.rake#L12
This should be “batched” similar to reports and other cleanup tasks to ensure it does not “time out” in the rails console/mariadb and not complete, or lock for extended periods of time.
Foreman and Proxy versions:
Foreman and Proxy plugin versions: