环境:在一个系统中有多个数据库,并且processes都设置的很大
解决方案:
Not able to create new DB , Errors ORA-27154,ORA-27300,ORA-27301,ORA-27302 (文档 ID 1916074.1)
How to increase the number of semaphores
https://access.redhat.com/solutions/2896
ORA-27154,ORA-27300,ORA-27301,ORA-27302
错误原因:processes总数超出操作系统信号量总大小
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.
***Checked for relevance on 08-Jul-2016***
Goal
While creating a new DB , the following error raised:
ORA-27154,ORA-27300,ORA-27301,ORA-27302.
-- Kernel Values show the following :
内核参数显示如下:
kernel.sem = 250 32000 100 128 ----------->>>> This indicates that 250 semaphores can be accomodated in an array and maximum of 128 arrays can be in the system.
这表示每个数组中有250个信号量,总共有128个数组
So, in total, 32000 (250X128) semaphores can present in the system.
所以,总共有250X128=32000个信号量
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.shmmni = 4096
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
-->上面这些是其他的参数,无关本文档
-- [oracle@localhost dbhome_1]$ ipcs
...
...
----- Semaphore Arrays --------
key semid owner perms nsems
0x21b9674c 196610 oracle 660 127
0x21b9674d 229379 oracle 660 127
0x21b9674e 262148 oracle 660 127
...
...
If we assume this is the case here.
假如我们遇到的是这种情况,
So, here, the actual semaphore accommodated per array is not 250, it is 127.
这说明每个数组中不是250,而是127,
So, practically, only 16256 (128*127) can present in the server.
所以只有16256个可用的信号量,这也就是我们计算processes总量远远未达到32000,但是依旧报错的原因,
Solution
解决方案:
kernel.sem = 250 32000 100 128 ---- >>>> This indicates that 250 semaphores can be accomodated in an array and maximum of 128 arrays can be in the system.
So, in total, 32000 (250X128) semaphores can present in the system.
Thus We need to increase the maximum number of arrays that can be present on the server.
Kindly follow the below steps :
-----------------------------------
1. Query the current semaphore values in the kernel
# /sbin/sysctl -a | grep sem
2. Modify SEMMNI value in the /etc/sysctl.conf.
From
kernel.sem = 250 32000 100 128
To
kernel.sem = 250 32000 100 200
3. # /sbin/sysctl -p
这里建议的是将kernel.sem修改为250X200,,但是中间的32000未改变,但是我根据在support.redhat.com上的文档
How to increase the number of semaphores:
将sysctl.conf中设置为
kernel.sem = 250 64000 100 256
并sysctl -p ,解决该问题。