Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Unable to upgrade - Table locks?

Unable to upgrade - Table locks?

Scheduled Pinned Locked Moved Support
7 Posts 2 Posters 45.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    Sympology
    wrote on last edited by
    #1

    Help, I've upgrading the server to the latest version and have a problem, it won't upgrade and now I have an unusable system.

    This is the error I'm getting.

    D:\NetXMS\bin>nxdbmgr upgrade
    NetXMS Database Manager Version 0.2.30

    Configuration file OK
    Upgrading database...
    Upgrading from version 97 to 98
    This database upgrade requires log conversion. This can take significant amount
    of time (up to few hours for large databases). If preserving all log records is
    not very important, it is recommended to clear logs befor conversion. Clear logs
    ? (Y/N) Y
    SQL query failed (The total number of locks exceeds the lock table size):
    DELETE FROM syslog
    Rolling back last stage due to upgrade errors...
    Database upgrade failed

    iI'm not a MySQL guy so have no idea where to even start to look to fix this issue. Hope you can help.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Try to connect to your database with mysql client and clear log tables manually by executing the following queries:

      DELETE FROM syslog;
      DELETE FROM event_log;
      DELETE FROM snmp_trap_log;
      DELETE FROM audit_log;

      Then run upgrade process again.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Also, there are a bug registered in MySQL bugtracker - http://bugs.mysql.com/bug.php?id=15667 which seems similar to your problem. One of possible solutions mentioned in comments is to increase value of server variable innodb_buffer_pool_size (may be useful if you use InnoDB database, not MyISAM).

        Also, if manual DELETE FROM statements will not work, try to clear tables with

        TRUNCATE TABLE syslog;
        TRUNCATE TABLE event_log;
        TRUNCATE TABLE snmp_trap_log;
        TRUNCATE TABLE audit_log;

        Best regards,
        Victor

        1 Reply Last reply
        0
        • S
          S
          Sympology
          wrote on last edited by
          #4

          Thanks guys, seems like a common issue with MySQL.

          I found this and it's worked:

          This occurs when MySQL runs out of locks, which for an InnoDB database occurs when the buffer pool is full. You can fix this by increasing the size of the buffer pool, by editng the innodb_buffer_pool_size option in my.cnf (my.ini), to set innodb_buffer_pool_size to a number higher than the default (which is typically 8M); for instance:

            innodb_buffer_pool_size = 256M

          Thanks for your help.

          1 Reply Last reply
          0
          • S
            S
            Sympology
            wrote on last edited by
            #5

            OK, so all looks ok, but running a db check and I get this:

            32.84.0). Link? (Y/N) Y
            * Checking node objects...                                            [FIXED ]
            * Checking interface objects...                                      [PASSED]
            * Checking network service objects...                                [PASSED]
            * Checking cluster objects...                                        [PASSED]
            * Checking template to node mapping...                                [PASSED]
            * Checking object properties...                                      [PASSED]
            * Checking event processing policy...                                [PASSED]
            * Checking collected data...                                          SQL query
            failed (Table 'netxms_db.idata_84' doesn't exist):
            SELECT count(*) FROM idata_84 WHERE idata_timestamp>1256215074
            SQL query failed (Table 'netxms_db.idata_86' doesn't exist):
            SELECT count(*) FROM idata_86 WHERE idata_timestamp>1256215074

            1 Reply Last reply
            0
            • S
              S
              Sympology
              wrote on last edited by
              #6

              Hit post to quick.
              It says the 1 was fixed, but are those failed tables anything to be concered about?

              1 Reply Last reply
              0
              • V
                V
                Victor Kirhenshtein
                wrote on last edited by
                #7

                That means that for nodes with id 84 and 86 collected data will not be stored. I suggest to recreate these tables by the following queries:

                CREATE TABLE idata_84 (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) not null);
                CREATE INDEX idx_idata_84_item_id ON idata_84(item_id);
                CREATE INDEX idx_idata_84_id_timestamp ON idata_84(item_id,idata_timestamp);

                CREATE TABLE idata_86 (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) not null);
                CREATE INDEX idx_idata_86_item_id ON idata_86(item_id);
                CREATE INDEX idx_idata_86_id_timestamp ON idata_86(item_id,idata_timestamp);

                Best regards,
                Victor

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                Powered by NodeBB Contributors
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups