I thought I had covered most edge cases for our Foreman infrastructure, although one I didnt consider was the number of log files that 70,000 hosts will create. After a year in business, we’ve finally hit that. I am seeing this in our logs:
2025-11-25T17:52:33 [E|app|e6e863ae] Error importing log messages for report ID: 26772210: PG::SequenceGeneratorLimitExceeded: ERROR: nextval: reached maximum value of sequence "logs_id_seq" (2147483647)
e6e863ae |
2025-11-25T17:52:33 [E|app|e6e863ae] Error processing normal report for host: qaregauto.ssnc.global: PG::SequenceGeneratorLimitExceeded: ERROR: nextval: reached maximum value of sequence "logs_id_seq" (2147483647)
e6e863ae |
2025-11-25T17:52:33 [E|app|e6e863ae] Error importing report for qaregauto.ssnc.global: PG::SequenceGeneratorLimitExceeded: ERROR: nextval: reached maximum value of sequence "logs_id_seq" (2147483647)
e6e863ae |
2025-11-25T17:52:33 [E|app|e6e863ae] Failed to import reports: PG::SequenceGeneratorLimitExceeded: ERROR: nextval: reached maximum value of sequence "logs_id_seq" (2147483647)
e6e863ae |
2025-11-25T17:52:33 [E|bac|e6e863ae] PG::SequenceGeneratorLimitExceeded: ERROR: nextval: reached maximum value of sequence "logs_id_seq" (2147483647)
e6e863ae | (ActiveRecord::StatementInvalid)
We seem to have hit the max number of logs allowed in the table. I’ve tried to run:
foreman-rake reports:expire days=10 But that doesnt actually seem to delete the rows of logs associated with reports?
Can I just set logs_id_seq to bigint and call it a day?