Oracle: semget failed!

I had an issue with starting a database a while back.  Basically, I ran out of resources on the server, and I had to adjust the kernel parameters.  Here are the details…

Error message:

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: sskgpcreates

According to Sam’s Oracle Blog, check the SHMMNS kernel parameter.  According to IBM, you can use the “ipcs -l” command and look on the line that says “max semaphores system wide”.  So, try this:

$ipcs -l | grep "max semaphores system wide"
max semaphores system wide = 32000

To change the setting, edit the “/etc/sysctl.conf” file:

vi /etc/sysctl.conf

Change this line:

kernel.sem = 250 32000 100 128

I doubled it:

kernel.sem = 250 64000 100 128

To, make the changes take affect, run:

sudo sysctl -p

Now, you should have the correct number:

$ipcs -l | grep "max semaphores system wide"
max semaphores system wide = 64000

It still didn’t work.  Ronny Egner’s blog suggested changing to this:

kernel.sem = 250 64000 100 256

After the “sysctl -p” command, that fixed the problem.


Leave a Comment

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