patternMinor
The database manager failed to allocate shared memory because an operating system kernel memory limit has been reached
Viewed 0 times
thesharedlimitsystembeendatabasebecauseoperatinghasreached
Problem
I have installed IBM DB2 10.5.5 and I want to create a new database there.
When I entered command
I am getting a error saying
Following is the output I get when I run "ipcs -l"
What is the reason for this? How can I fix it?
I am running on Ubuntu 14.04 with 8GB physical memory.
When I entered command
db2 create database test1I am getting a error saying
SQL1084C The database manager failed to allocate shared memory because an
operating system kernel memory limit has been reached. SQLSTATE=57019Following is the output I get when I run "ipcs -l"
------ Shared Memory Limits --------
max number of segments = 10000
max seg size (kbytes) = 4882812
max total shared memory (kbytes) = 33554432
min seg size (bytes) = 1
------ Semaphore Limits --------
max number of arrays = 4096
max semaphores per array = 250
max semaphores system wide = 1024000
max ops per semop call = 32
semaphore max value = 32767
------ Messages Limits --------
max queues system wide = 16384
max size of message (bytes) = 65536
default max size of queue (bytes) = 16384What is the reason for this? How can I fix it?
I am running on Ubuntu 14.04 with 8GB physical memory.
Solution
I just had the same problem! In my case the problem was just the memory of the DB2 instance.
In windows type:
In linux:
You will get something like that:
The solution in my case was simply set the same threshold value but by activating the automatic mode:
The command "immediate" apply the settings now without the need to restart the instance. So if you get the settings again will have:
Now try to connect to your database again. I believe that will again connect normally.
According to the DB2 documentation:
This parameter specifies the maximum amount of memory that can be
allocated for a database partition if you are using DB2® database
products with memory usage restrictions or if you set it to a specific
value. Otherwise, the AUTOMATIC setting allows instance memory to
grow as needed.
Font: IBM Knowledge Center
In windows type:
db2 get dbm cfg | findstr MEMORYIn linux:
db2 get dbm cfg | grep MEMORYYou will get something like that:
Global instance memory (4KB) (INSTANCE_MEMORY) = 500000The solution in my case was simply set the same threshold value but by activating the automatic mode:
db2 update dbm cfg using INSTANCE_MEMORY 100000 automatic immediateThe command "immediate" apply the settings now without the need to restart the instance. So if you get the settings again will have:
Global instance memory (4KB) (INSTANCE_MEMORY) = AUTOMATIC(5000000)Now try to connect to your database again. I believe that will again connect normally.
According to the DB2 documentation:
This parameter specifies the maximum amount of memory that can be
allocated for a database partition if you are using DB2® database
products with memory usage restrictions or if you set it to a specific
value. Otherwise, the AUTOMATIC setting allows instance memory to
grow as needed.
Font: IBM Knowledge Center
Code Snippets
db2 get dbm cfg | findstr MEMORYdb2 get dbm cfg | grep MEMORYGlobal instance memory (4KB) (INSTANCE_MEMORY) = 500000db2 update dbm cfg using INSTANCE_MEMORY 100000 automatic immediateGlobal instance memory (4KB) (INSTANCE_MEMORY) = AUTOMATIC(5000000)Context
StackExchange Database Administrators Q#129087, answer score: 5
Revisions (0)
No revisions yet.