I am trying to purge some puppet reports following the guide @
http://theforeman.org/projects/foreman/wiki/Puppet_Reports
I have never purged reports before since I've started using foreman
probably about 6 months ago and we now have 4000+ systems reporting every
30 min. So there are LOTS of reports …
The first time I ran the command and received an error it looked like:
rake18 reports:expire days=7 status=0 RAILS_ENV="production"
(in /srv/www/usps-puppet-foreman)
rake aborted!
Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes: SELECT
id FROM reports
WHERE (reports
.id
IN
(3,4,6,7,8,9,10,11,12,13,17,18,89,139,142,148,151,188,199,1386,1388,1416,1429,1436,1437,1445,…
I then increased the max_allowed_packet on the mysql server and ran it
again now with the following error:
rake18 reports:expire days=7 status=0 RAILS_ENV="production"
(in /srv/www/usps-puppet-foreman)
rake aborted!
Mysql::Error: Out of memory (Needed 2304288 bytes): SELECT id FROM
reports
WHERE (reports
.id
IN
(3,4,6,7,8,9,10,11,12,13,17,18,89,139,142,148,151,188,199,1386,1388,1416,1429,1436,1437,1445,1446,1447,1451,1455,1458,1460,1463,1466,1471,1478,1479,1485,1490,1496,1497,1498,1511,1512,1519,1520,1527,1531,1896,1901,1903,1905,1912,1915,2441,2445,2449,2451,2455,2462,3106,3589,3590,3593,3598,3601,3605,3608,3611,3612,3624,6169,6224,6229,6232,6235,6236,6245,6246,6249,6256,6278,6293,6311,6315,6316,6339,6342,6344,6347,6348,6350,6353,6360,6361,6363,6365
…
Any tips on how to get past this? I promise to then run it weekly so that
the queries do not get so large again.
Thanks!
Jake