cancel
Showing results for 
Search instead for 
Did you mean: 

Semaphore issue

Kanagaraj
Regular Advisor

Semaphore issue

linux el5 running server has installed/configured with two oracle databases.

backups couldn't start due to semaphore issue,
as per the backup logs,backup process can't get allocate semaphore to start backup.

Logs attached below.
--------------------
ERROR: plGetSemArray: semget() failed allocating allocator Semaphore Array for <1268891981_21288_3071633104> allocatorCount=1 errno=28

Also I have verified on server,ther are 132 semaphore allcated for users process,those user's process are running and also it may interlinked with oracle.

I have cleared dead shared memory and message queue.

I have checked for semaphore kernal parameter,it is oracle recommended settings.

#ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4194303
max total shared memory (kbytes) = 1073741824
min seg size (bytes) = 1

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

------ Messages: Limits --------
max queues system wide = 1024
max size of message (bytes) = 65536
default max size of queue (bytes) = 65536
-----------------------------------------

settings for semaphore in /etc/sysctl.conf file
kernel.sem = 250 32000 100 128

If anybody knows how to clear unused semaphore in linux with reboot,Please help me out in this.becuase still backups pendingfor the server,

///Is it possible to run sem_destroy on linux.

Is we able to increase sem values more than current settings
kernel.sem = 250 32000 100 128

Thanks,
Kanagu
7 REPLIES
Kanagaraj
Regular Advisor

Re: Semaphore issue

//mistyped.

If anybody knows how to clear unused semaphore in linux without reboot,Please help me out in this.becuase still backups pending for the server,
Dennis Handly
Acclaimed Contributor

Re: Semaphore issue

>If anybody knows how to clear unused semaphore in linux without reboot

For HP-UX there is ipcrm(1) with -s or -S.
Kanagaraj
Regular Advisor

Re: Semaphore issue

Thanks Dennis,

ipcrm -s or -S -> we can use but I want to know how to assure dummy semaphore which not used by any thread/process.
Dennis Handly
Acclaimed Contributor

Re: Semaphore issue

>I want to know how to assure dummy semaphore which not used by any thread/process.

Does your Linux "ipcs -sa" display OTIME with a time and date? Or is as broken as HP-UX with a useless time only?
John Guster
Trusted Contributor

Re: Semaphore issue

ipcs -sa, check nattch, if it is zero, then that share memory should be released for use.
Kanagaraj
Regular Advisor

Re: Semaphore issue

The problem resolved by increased semaphore values.

kernel.sem = 500 64000 400 128

Also we have rebooted the server.Now it is working fine
Kanagaraj
Regular Advisor

Re: Semaphore issue

Thanks all for tour valuable time.Closing the thread