Bug #13810
closed
Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)
Added by Doug Forster almost 9 years ago.
Updated over 6 years ago.
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')
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.
- 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)
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?
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.
- Has duplicate Bug #17270: Running out of IDs in logs table added
- Has duplicate Feature #17251: Data type of the id on 'big' tables added
#17251 notes that this applies also to 'reports' and 'fact_values'. The columns could be changed to 64-bit counters (limit: 8).
- Has duplicate Bug #17999: Fact values id exceeds mysql maximum added
- Status changed from New to Ready For Testing
- Assignee set to Timo Goebel
- Pull request https://github.com/theforeman/foreman/pull/4169 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 209
- Related to Bug #18130: Fail to import facts and reports - auto increment ID is no longer set on many reports and facts table. added
- Has duplicate Bug #20423: Foreman DB logs index out of range added
Also available in: Atom
PDF