Recently a customer observed on one of their systems, that the number n of databases started quite nicely on a system. However when they tried to start database n+1 on it, it just yielded the following error message.

SQL> startup
ORA-27125: unable to create shared memory segment
SVR4 Error: 28: No space left on device

Your first reflex ist to check the amount of free shared memory, but the system had ample of it free. My first reflex after seeing an unlimited ZFS ARC was that we simply run out of memory and that the customer should limit that at first. However then i remembered there is a second resource that creates this errormessage as well. It’s the number of shared memory IDs. You have to check them as well. Per default they are limited to 128.

$ prctl -n project.max-shm-ids -i process $$
process: 4457: -ksh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-ids
        privileged        128       -   deny                                 -
        system          16.8M     max   deny   

I suggested to increase this number significantly.

# projmod -A -s -K "project.max-shm-ids=(privileged,1024,deny)" user.oracle

Let’s check the situation again.

$ prctl -n project.max-shm-ids -i process $$
process: 16382: -ksh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-ids
       privileged      1.02K       -   deny                                 -
       system          16.8M     max   deny  

After this, the database n+1 started without any problem.

Written by

Joerg Moellenkamp

Grey-haired, sometimes grey-bearded Windows dismissing Unix guy.