1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 User Id jumping

Discussion in 'Troubleshooting and Problems' started by silence, Feb 5, 2015.

  1. silence

    silence Well-Known Member

    There really isn't anything I can do to fix this, but I'm getting this weird issue where user id auto incrementation jumps. Is this a known XF bug?

    Example:
    2ecdd066fc2992697f89b2ea09b30738.png
     
  2. silence

    silence Well-Known Member

    Also it happened again and now I'm in the 100,000 user id range. I only have 5,000 registered users!
     
  3. Mike

    Mike XenForo Developer Staff Member

    I'm pretty sure that would only happen by a record actually being inserted with a specific ID, even if that record is later deleted.

    It's not something we've had any other reports of.
     
  4. silence

    silence Well-Known Member

    I'm gonna probably write a script to fix it but I'm just wondering what would be doing that.
     
  5. Kuma

    Kuma Active Member

    Odd question, but are you on a master-master MySQL replication setup? Some times they enter some crazy values for the system to increment by.
     
  6. silence

    silence Well-Known Member

    It looks like master replication might be enabled but I'm not sure :(
    As far as I know it's just a single MySQL server.
     
  7. Kuma

    Kuma Active Member

    Can you post your my.cnf with anything sensitive like a password commented out?
     
  8. silence

    silence Well-Known Member

    It's a mess.

    Code:
    [mysqld_safe]
    err-log                        = /var/log/mysql/mysql.err
    
    [mysqld]
    innodb_file_per_table
    
    # GENERAL #
    character-set-server           = utf8
    user                           = mysql
    bind-address                   = x.x.x.x
    server-id                      = 1
    default-storage-engine         = InnoDB
    pid-file                       = /var/run/mysqld/mysqld.pid
    port                           = xxxxx
    socket                         = /var/run/mysqld/mysqld.sock
    
    # DATA STORAGE #
    datadir                        = /var/lib/mysql
    basedir                        = /usr
    tmpdir                         = /tmp/
    
    # MyISAM #
    key_buffer_size                = 96M
    myisam_recover                 = FORCE,BACKUP
    
    # SAFETY #
    max_allowed_packet             = 64M
    wait_timeout                   = 2880000
    interactive_timeout            = 288000
    max-connect-errors             = 1000000
    skip-name-resolve
    innodb                         = FORCE
    symbolic-links                 = 0
    
    # BINARY LOGGING #
    log_bin                        = /var/lib/mysql-hdd/mysql-bin/mysql-bin
    expire_logs_days               = 4
    sync_binlog                    = 1
    binlog-format                  = MIXED
    
    # CACHES AND LIMITS #
    tmp_table_size                 = 128M
    max_heap_table_size            = 128M
    max_connections                = 2500
    thread_cache_size              = 50
    open_files_limit               = 65535
    table_definition_cache         = 4096
    table_open_cache               = 2048
    long_query_time                = 5
    
    # INNODB #
    #innodb_doublewrite_file
    innodb_flush_method            = O_DIRECT
    innodb_data_home_dir           = /var/lib/mysql-hdd/innodb
    innodb_log_group_home_dir      = /var/lib/mysql-hdd/innodb
    innodb_log_files_in_group      = 2
    innodb_log_file_size           = 512M
    innodb_log_buffer_size         = 4M
    innodb_flush_log_at_trx_commit = 1
    innodb_flush_neighbors         = 0
    innodb_thread_concurrency      = 8
    innodb_buffer_pool_size        = 512M
    innodb_io_capacity             = 1000
    innodb_open_files              = 1024
    innodb_support_xa              = 0
    
    # LOGGING #
    general_log                    = 0
    general_log_file               = /var/log/mysql/mysql-general.log
    log_error                      = /var/log/mysql/mysql-error.log
    slow_query_log_file            = /var/log/mysql/mysql-slow.log
    log_queries_not_using_indexes  = 1
    slow_query_log                 = 0
    lc_messages_dir                = /usr/share/mysql
    lc_messages                    = en_US
    
    # QUERY CACHE #
    query_cache_type               = 1
    query_cache_size               = 2M
    
    thread_handling                = pool-of-threads
    
    [mysqldump]
    quick
    max_allowed_packet             = 16M
    
    [mysqlhotcopy]
    interactive-timeout
    
    [mariadb]
     
  9. Kuma

    Kuma Active Member

    I do not see anything there that would have caused that. Do you have the logs from the days that the high difference values occurred?
     
  10. silence

    silence Well-Known Member

    I don't believe so :(
     
  11. Kuma

    Kuma Active Member

  12. silence

    silence Well-Known Member

  13. Kuma

    Kuma Active Member

    You would want to search for an INSERT INTO command on the user table. You want to find out if it passed a userid in the query.
     

Share This Page