Bug #13810
closedReports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)
Description
| ActiveRecord::StatementInvalid: Mysql2::Error: Out of range value for column 'id' at row 1: INSERT INTO `logs` (`created_at`, `level_id`, `message_id`, `report_id`, `source_id`, `updated_at`) VALUES ('2016-02-19 04:48:08', 1, 9, 128052331, 3, '2016-02-19 04:48:08')
Updated by Dominic Cleal almost 9 years ago
- Category set to Database
IIRC the default length is 4 bytes for an integer column, you might be able to alter the schema and widen the logs.id column as a workaround.
Updated by Dominic Cleal almost 9 years ago
- Subject changed from Puppet reports are no longer being processed to Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)
Updated by Jason Hane almost 9 years ago
We just ran into a similar issue. I noticed the ID columns are not unsigned so I altered the tables to make them so. I believe that should be the default. Also at some point since we're purging reports after 90 days we could probably reset the auto increment to 1. Would that cause any issues?
Updated by Dominic Cleal almost 9 years ago
Jason, this is just a join table between reports/messages/sources, so they're not going to be referenced anywhere else. I don't know if MySQL will skip IDs that are already in use though if the logs aren't expired exactly in order, but I guess it's probably going to be OK.
Updated by Dominic Cleal about 8 years ago
- Has duplicate Bug #17270: Running out of IDs in logs table added
Updated by Dominic Cleal about 8 years ago
- Has duplicate Feature #17251: Data type of the id on 'big' tables added
Updated by Dominic Cleal about 8 years ago
#17251 notes that this applies also to 'reports' and 'fact_values'. The columns could be changed to 64-bit counters (limit: 8).
Updated by Dominic Cleal almost 8 years ago
- Has duplicate Bug #17999: Fact values id exceeds mysql maximum added
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Timo Goebel
- Pull request https://github.com/theforeman/foreman/pull/4169 added
Updated by Timo Goebel almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset bec68fe2c04a2b6a714b53cfdcdc7abd00852a52.
Updated by Dominic Cleal almost 8 years ago
- Translation missing: en.field_release set to 209
Updated by Ohad Levy almost 8 years ago
- Related to Bug #18130: Fail to import facts and reports - auto increment ID is no longer set on many reports and facts table. added
Updated by Daniel Lobato Garcia over 7 years ago
- Has duplicate Bug #20423: Foreman DB logs index out of range added