1833476 Members
3189 Online
110052 Solutions
New Discussion

Semaphore limit exceeded

 
Andrew Crowe_2
Advisor

Semaphore limit exceeded

Hi all,

We've had a problem with our server running HP-UX 10.20 and MFG/PRO. A few hours ago the server crashed and rebooted itself. When it came back up the databases wouldn't start, stating "semaphore limit exceeded" Nothing has changed on the box, so presumably something is hanging up and holding the semaphores open, as it worked fine before.

Any ideas on how I can check why we don't have enough semaphores to start the databases, and how to free them up?

Thanks for your help
7 REPLIES 7
Ken Hubnik_2
Honored Contributor

Re: Semaphore limit exceeded

Install the trial version of glanceplus and it will show you how many are being used and what you have available.
Mark Grant
Honored Contributor

Re: Semaphore limit exceeded

You can use "ipcs -s" to see what semaphores are in use within the system and you can increase them with a kernel tunable.
Never preceed any demonstration with anything more predictive than "watch this"
Andrew Crowe_2
Advisor

Re: Semaphore limit exceeded

OK - looking at the semaphores in use, we appear to have only 25 or so in use, (numbered 1 - 16, 337, 82, 147, 84, 21, 22, 87.

According to our kernel parameters, we should have 300 semaphores to play with.

Trying to start another database at this point gives us the semaphore limit exceeded error.

Could a process in the startup scripts be hanging and holding up the semaphores?
Hari Kumar
Trusted Contributor

Re: Semaphore limit exceeded

The Semaphores and their use ::::::
semaem
Semaphore value-change limit
semmap
Size of free-semaphore resource map
semmni
Maximum semaphores system-wide
semmns
Maximum user-accessible semaphores system-wide
semmnu
Maximum undos per semaphore
semume
Maximum semaphore undos per process
semvmx
Maximum allowed semaphore value

The suggested semaphore values to be changed are SEMMNI and SEMMNS to greater values for Oracle database.
Also find the appropriate DATABASE 'S Installation and Configuration MANUAL/Documnet for the specific version of OS and cross check for their suggested semaphore values and patches required to be installed.

Thanks,
Information is Wealth ; Knowledge is Power
Steven E. Protter
Exalted Contributor

Re: Semaphore limit exceeded

ipcs command with various command line options will show you use.

shmmax, shmseg in the kernel will let you increase those values.

I'm not great with 10.20 and can only recommend sam for the kernel change.

sam
kernel
configurable parameters.

when done.

Actions process new kernel.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kevin Wright
Honored Contributor

Re: Semaphore limit exceeded

As others have stated, check you semmni and semmns values.

You mentioned you on 10.20 so you can't use kmtune, sysdef may work to see current value.

My guess is the reason it crashed was semaphore limit, but you should be able to start it.. then check ipcs -s, and see if you have many semaphores owned by the application. I guess the ones you see now are just owned by root.
Andrew Crowe_2
Advisor

Re: Semaphore limit exceeded

Thanks for your suggestions.

I tried to regenerate the kernel with the new parameters, but the console threw up a memory fault error, and locked up!

I restarted the server from a client, and when it came back up, everything is working fine with the old semaphore paramters!

Slightly worrying - I'll see if I can track down what caused it, but at least we are back up and running (and the server is getting decommissioned in 4 weeks anyway...)

Thanks again