Skip to content
Home » Oracle » How to Resolve ORA-27302 Failure Occurred at: sskgpsemsper

How to Resolve ORA-27302 Failure Occurred at: sskgpsemsper

ORA-27302 sskgpsemsper

After creating another database by DBCA on the same server, I found the first database started up successfully, but the second one failed to startup.

[oracle@oracle9i ~]$ sqlplus /nolog
...
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemsper

The error messages could mislead DBA to check the available space. In fact, there are still a lot of available space. It seems the limited resource prevent the database from starting up.

At last, I found an Oracle Document mentioned that the kernel parameter SEMMNS and SEMMSL are set too low to startup the second database. Let's see current kernel parameters of the server:

[root@oracle9i ~]# cat /etc/sysctl.conf
...
kernel.core_uses_pid = 1
kernel.shmmax = 2147483648
kernel.shmmni = 100
kernel.shmall = 2097152

# Semaphores:MSL MNS OPM MNI
kernel.sem = 100 256 100 100

fs.file-max = 327679
kernel.hostname   = oracle9i.example.com
kernel.domainname = example.com

Indeed, the values are set too low. Therefore, the values of SEMMSL and SEMMNS need to be increased:

[root@oracle9i ~]# vi /etc/sysctl.conf
...
kernel.sem = 256 32768 100 256
...

[root@oracle9i ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmmax = 2147483648
kernel.shmmni = 100
kernel.shmall = 2097152
kernel.sem = 256 32768 100 256
fs.file-max = 327679
kernel.hostname = oracle9i.example.com
kernel.domainname = example.com

Let's try to startup the second database again.

[oracle@oracle9i ~]$ sqlplus /nolog
...
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
...
Database mounted.
Database opened.
SQL> exit

The second database has been startup successfully.

According to Oracle Document 314179.1, the values of these semaphores are recommended to set to:

  • SEMMNS: At least twice the sum of all processes of all databases, and add 10 every database. If you have n databases which have m processes average, you may set the value to:
    SEMMNS = n*m +n*10 = n*(m+10)
  • SEMMSL: The document recommends the value 256.

Leave a Reply

Your email address will not be published. Required fields are marked *