1.2.16 database migration - out of memory [SOLVED]
-
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.1Problem 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 memoryTo 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):
-
edit /etc/sysctl.conf, adding the line:
kernel.shmmax = 2000000000 -
force update (without reboot):
# sysctl -p -
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- restart postgres (/etc/init.d/postgresql restart) and re-run the "nxdbmgr upgrade".
You should be all set!
-
-
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