Operating System - HP-UX
1837228 Members
2370 Online
110115 Solutions
New Discussion

Semaphore limit exceeded (1131)

 
SOLVED
Go to solution
Andrew Crowe_2
Advisor

Semaphore limit exceeded (1131)

I have a HP9000 server (HP-UX10.20) which runs our ERP system. We have a live database and also a test database but I can only get the live databse to start as I am getting the message:

Semaphore limit exceeded (1131)

Is there a way I can check the usage of semaphores AND is it just matter of increasing the semmns kernel parameter?

This has just started happening but the live databse has grown very large recently, is this the reason?

Any help would be great(especially if it can be helped without a reboot as system downtime is very dificult to get)

Thanks
11 REPLIES 11
Stefan Farrelly
Honored Contributor

Re: Semaphore limit exceeded (1131)


Youre going to have to reboot after youve inreased the semmns kernel parameter, unless you can close something down thats using some semaphores now to free some up. Use;

ipcs -sa

To show currently used semaphores and how many they are using. There is a script available to show which pids are using them also.

The best way ive found to keep an eye on semaphore usage is using glance/gpm - the system tables report shows % usage of semaphores so you can see when its nearing full.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Juan Manuel López
Valued Contributor

Re: Semaphore limit exceeded (1131)

Hi.
There are some applications that use many resources from machine. It is not normal this way, so that??s life.
When you get the message " semaphore limit exceeded ", all you can do is modify kernel parameters to permit more samaphores, then reboot your machine and investigate the running application to find out if the semaphore needs are normal.
If you are absolute sure about the semaphore " dead " that belong to your application, you can delete it ussing command:
" ipcs -sa " ( get semaphore condittions )
" ipcrm -s < semaphore number > " ( delete semaphore )

So it is a bit dangerous.

Hope this help you.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Dietmar Konermann
Honored Contributor

Re: Semaphore limit exceeded (1131)

The error message is somehow vague, because there are several limits that can be hit by a process... number of sems, number of sem sets, number of sem undos, etc.

Do you get more details along with this message... i.e. what specific syscall failed with what errno?

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Andrew Crowe_2
Advisor

Re: Semaphore limit exceeded (1131)

I've just discovered another proble, may be connected may not.

I cannot ll / The session hangs. I can ls and ls -a but not ll, also I cannot cd into /net (which I am pretty sure is empty). I think /net is corrupted.

Can I fsck without first unmounting?

Could this be linked to my bother semaphore problem? Or am I grasping at straws.

All your replies are gratefully revieved.

Thanks
Dietmar Konermann
Honored Contributor

Re: Semaphore limit exceeded (1131)

/net is by default configured for the automounter or autofs.

# cat /etc/auto_master
/net -hosts -nosuid,soft

So the symptom looks like a hanging automountd or automounter process.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Andrew Crowe_2
Advisor

Re: Semaphore limit exceeded (1131)

The output I get from cat /etc/auto_master is
/net -hosts -soft.

How will I sort out the hanging automountd or automounter process?

Ravi_8
Honored Contributor
Solution

Re: Semaphore limit exceeded (1131)

Hi,

set the AUTO_MOUNT flag in /etc/rc.config.d/nfsconf to 0

restart the nfs services
(#/usr/sbin/nfs.server stop/start,
#/usr/sbin/nfs.client stop/start)
never give up
Andrew Crowe_2
Advisor

Re: Semaphore limit exceeded (1131)

Ravi,

Can't find /usr/sbin/nfs.server or
/usr/sbin/nfs.client

Could they be somewhere else?
Dietmar Konermann
Honored Contributor

Re: Semaphore limit exceeded (1131)

1) /sbin/init.d/nfs.client stop

2) set AUTO_MOUNT=0 in etc/rc.config.d/nfsconf

3) /sbin/init.d/nfs.client start

If one of the scripts hangs or automound/automounter cannot be terminated then a reboot could be the last resort to clean the situation.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Andrew Crowe_2
Advisor

Re: Semaphore limit exceeded (1131)

Thanks Dietmar/Ravi,

I have tried that and it is still the same. I will try the reboot, but unfortunatly will have to wait for downtime.

Will i have to reset the AUTOMOUNT parameter or shall I just leave it?

Also do you think this could anything to do with my semaphore problem as they seem to arrived at the same time, when I had to change the IP address on the server.

Thanks for all the help anyway, I'm learning lots today.

Regards
Andrew
Ravi_8
Honored Contributor

Re: Semaphore limit exceeded (1131)

Hi, (again)

since the semaphores are used for process synchronisation, increasing their values wouldn't solve the problem i think.
try increasing shmmax values
never give up