ORA-27154 Unable to start database due to semaphore problem

Source: Internet
Author: User
Tags semaphore

Test library execution startup prompt (11.2.0.1):


error in Query ORA-27154 :

Error:  ora-27154text:   post/wait Create failed----------------------------------------------------------- ----------------Cause:  internal Error, multiple post/wait creates attempted simultaneously action:check errno and Co Ntact Oracle Support
The hint is an internal error, and multiple post/wait are requested at the same time.


DF There's a lot more disk space to look at, and there's no full situation .


View the error in the semget meaning :

Tip Segmet means that get a semaphore set identifier, that is, get a semaphore set identifier. Indicates that this error may be related to the amount of semaphore not received,No space left on device is not the storage space , but the semaphore resource.


from MoS introduction Look (949468.1), a series of error appeared 10. 1.0.2 to the 11.2.0.2 range . examples are given:

$ ipcs-ls

------Semaphore Limits--------

Max number of arrays = 128

Max semaphores per array = 250

Max semaphores system wide = 32000

Max Ops per semop call = 100

Semaphore max value = 32767

The reason for this is that, in principle, the 32000 semaphore is available , and a semaphore identifier can contain a maximum of 250 semaphores. However, the IPCS command shows that each semaphore identifier only allows Oracle to contain a maximum of 156 semaphores.

$ IPCS << This example does not start an additional instance, it contains approximately 100 semaphore character sets

..

------Semaphore Arrays--------

Key Semid owner Perms Nsems

0X450E15BD 0 Root 666 1

0x0000cace 32769 Root 666 1

0X358B172C 327683 Oracle 660 104

0x9053d038 11075588 Oracle 660 156

0x9053d039 11108357 Oracle 660 156

0x9053d03a 11141126 Oracle 660 156

0x9053d03b 11173895 Oracle 660 156

..

then the maximum amount of signal available is 156*128=. 19968, not 32000.

The workaround increases the amount of semaphores that can be included, which adjusts the settings according to the Semmni parameter.

1. Query the semaphore parameter value of the current kernel.

#/sbin/sysctl-a | grep sem

2. Modify the Semmni parameter of the/etc/sysctl.conf file.

from Kernel.sem = 32000 modified to Kernel.sem = 32000

3. Use #/sbin/sysctl-p for the changes to take effect.


In my case, first look at the results of IPCS:


After the database is started, the shared memory and semaphores need to be allocated from the operating system, which is equivalent to the memory lock of the OS, similar to the latch of Oracle ( note the difference between Oracle's Locks and latch ), When each process needs to acquire operating system memory, it needs to obtain the semaphore before it can request memory.

From the above instruction can see the maximum available semaphore is 100, semaphore identifier set maximum is 128, er, here error, at that time did not see IPCS actual semaphore identifier set. Here are the meanings of the 4 parameters:

SEMMSL defines the minimum recommended value,For initial installation only
The maximum number of sempahores that can is in one semaphore set. It should be same size as maximum number of Oracle processes.the maximum number of semaphores allowed in a semaphore set. Requires the same number of process as Oracle.
semmns defines the maximum semaphores on the system.
This setting is a minimum recommended value,For initial installation only. The Semmns parametershould BES set to the sum of the PROCESSES parameterFor each Oracle database, adding the largest one twice,And then adding a additional for each database.
The maximum number of semaphores allowed by the system, thesemmns parameter should be set to the processes parameter of each database, plus twice times the maximum value, and then each database plus The extra 10, calculated out of the sum. (Note that this value is the minimum recommended value)
semopm defines the maximum number of operations for each SEMOP call
The maximum number of operands per semaphore call.
Semmni -Defines the maximum number of semaphore sets in the entire system
The maximum value of the semaphore set in the system.
can speculate SEMMNS=SEMMSL * Semmni.
But in the example above: 100<>100 * 128,semmns the maximum allowable semaphore (recommended minimum) is only 100, which obviously does not satisfy the number of calculations. and fromthe recommended values for these parameters are seen in Oracle's official documentation:

Configuring Kernel Parameters

Verify the kernel parameters shown in the following table is set to values greater than or equal to the recommended Value shown. The procedure following the table describes how to verify and set the values.

parameter
value file
Semmsl

Semmns

semopm

Semmni

250

32000

100

128

/proc/sys/kernel/sem
semmns is 32000, or semmsi (+) Results of *semmni (128).


then you can infer the sskgpcreates of the error hint may be related to the number of process, kernel and the value of the parameter is Semmns, and the conclusion is the same as above, that is too much process, but the maximum allowable signal is too little, the two do not match, causing N O Space left on device indicates a low semaphore resource .


Solutions such as MOS pointing, modify semaphore parameter values, can be used:

This method is only temporary modification , the machine fails after the restart, if it needs to be effective, can modify /etc/sysctl.conf corresponding the value of the parameter .


Summary :

1. Error message No space left on device does not necessarily indicate a lack of storage space, which in this case refers to the semaphore resource.

2. Meaning of four parameters in Kernel.sem, and semmns (maximum allowable semaphore) =SEMMSL (a semaphore set allows the included semaphore) * Semmni (the maximum set of semaphores allowed by the system) and the defines the maximum semaphores on the system. this setting is a minimum recommended value, for initial installation only.

3. Using Baidu or Google or even MOS to find the problem , you may find a solution, but more importantly, you can know the reason, and then understand the scene of the problem, combined with their own problems , determine the same class, then perform the operation, one sentence: be cautious.

ORA-27154 Unable to start database due to semaphore problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.