Project

General

Profile

Actions

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.

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

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')


Related issues 5 (0 open5 closed)

Related to Foreman - Bug #18130: Fail to import facts and reports - auto increment ID is no longer set on many reports and facts table.ClosedTimo Goebel01/18/2017Actions
Has duplicate Foreman - Bug #17270: Running out of IDs in logs tableDuplicate11/08/2016Actions
Has duplicate Foreman - Feature #17251: Data type of the id on 'big' tablesDuplicate11/07/2016Actions
Has duplicate Foreman - Bug #17999: Fact values id exceeds mysql maximumDuplicate01/10/2017Actions
Has duplicate Foreman - Bug #20423: Foreman DB logs index out of rangeDuplicate07/26/2017Actions
Actions #1

Updated by Doug Forster almost 9 years ago

Foreman 1.10.0

Actions #2

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.

Actions #3

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)
Actions #4

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?

Actions #5

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.

Actions #6

Updated by Dominic Cleal about 8 years ago

  • Has duplicate Bug #17270: Running out of IDs in logs table added
Actions #7

Updated by Dominic Cleal about 8 years ago

  • Has duplicate Feature #17251: Data type of the id on 'big' tables added
Actions #8

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).

Actions #9

Updated by Dominic Cleal almost 8 years ago

  • Has duplicate Bug #17999: Fact values id exceeds mysql maximum added
Actions #10

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
Actions #11

Updated by Timo Goebel almost 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #12

Updated by Dominic Cleal almost 8 years ago

  • Translation missing: en.field_release set to 209
Actions #13

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
Actions #14

Updated by Daniel Lobato Garcia over 7 years ago

  • Has duplicate Bug #20423: Foreman DB logs index out of range added
Actions

Also available in: Atom PDF