Removing large numbers of Actions::Katello::Host tasks consuming database resources

Solution In Progress - Updated -

Issue

  • Satellite 6 is performing poorly
  • Slow user interface actions
  • Slow operations in general
  • Tasks are not being processed in an expected timeframe
  • Disk space consumption by Postgres is high (/var/lib/pgsql)

If the Satellite 6 server has more than 10,000 tasks of type Actions::Katello::Host::* immediate removal as well as automatic cleanup is required to return the Satellite to optimal operations.

The majority are comprised of 4 types:

 Actions::Katello::Host::GenerateApplicability
 Actions::Katello::Host::UploadPackageProfile
 Actions::Katello::Host::UploadProfiles  
 Actions::Katello::Host::Update

You can check the count of stored Host tasks via a simple query:

#  echo "select count(label) from foreman_tasks_tasks where label like 'Actions::Katello::Host%';" | sudo -u postgres psql -d foreman
could not change directory to "/root"
 count 
-------
  120346
(1 row)

If this number is above 10,000 you should consider cleaning out your stopped tasks. These types of tasks often comprise over 90%+ of the tasks in Satellite's database if left unchecked. These tasks are small and should not be retained for any length of time as they generally don't hold any relevant data.

Environment

Satellite 6.6 or older

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content