Project

General

Profile

Actions

Bug #8316

closed

Removing a long-standing host creates huge transaction

Added by Daniel Lobato Garcia over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Removing a host with some reports (say 200), and each of them with several log lines (10000) generates 2.000.000 DELETE sql statements in the same transaction.
More often than not, ActiveRecord won't be able to make such a big transaction, in fact it will likely eat all memory available and Foreman will stop working in that host. In the best scenario the DB will end up with a non-committed giant transaction.

I suggest deleting hosts and reports manually on host destroy to avoid this.


Related issues 2 (1 open1 closed)

Related to Foreman - Bug #8565: report::expire is running very slowlyClosedDominic Cleal12/03/2014Actions
Related to Foreman - Refactor #1955: improve host deletion speedNew11/18/2012Actions
Actions

Also available in: Atom PDF