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. 1.2.16 database migration - out of memory [SOLVED]

1.2.16 database migration - out of memory [SOLVED]

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 10.3k 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.
  • N
    N
    netmg
    wrote on last edited by
    #1

    We ran across this issue while upgrading from 1.2.14 to 1.2.16 on a Ubuntu 12.04 host and with help from Alex and Victor we found a solution and wanted to post here in case others ran into this same problem.

    Environment:
      Ubuntu 12.04 (VM, 3Gb RAM)
      NetXMS 1.2.14 (upgrading to 1.2.16)
      Postgresql 9.1

    Problem encountered:

      After installing all required .deb upgrade images successfully for 1.2.16 we ran the usual "nxdbmgr upgrade" command.  In this situation, nxdbmgr ran for quite a while then failed with:

          ...
          NOTICE:  CREATE TABLE / UNIQUE will create implicit index "tdata_rows_2627_record_id_key" for table "tdata_2627"
          NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "tdata_records_2627_pkey" for table "tdata_records_2627"
          NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "tdata_rows_2627_pkey" for table "tdata_rows_2627"
          WARNING:  out of shared memory

    To fix this we made kernel and postgres config changes as below.  Of course specific values will need to be modified based on your environement (if it still fails, increase settings and try again):

    1. edit /etc/sysctl.conf, adding the line:
            kernel.shmmax = 2000000000

    2. force update (without reboot):
            # sysctl -p

    3. modify postgresql.conf (in our environment, /etc/postgresql/9.1/main/postgresql.conf by uncommenting the following lines and changing their values to:

          shared_buffers = 1024MB
          temp_buffers = 32MB
          max_locks_per_transaction = 256

    1. restart postgres (/etc/init.d/postgresql restart) and re-run the "nxdbmgr upgrade". 

    You should be all set!

    1 Reply Last reply
    0
    • T
      T
      tomaskir
      wrote on last edited by
      #2

      Thank you for sharing 🙂

      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