Semaphore error

rideyukon34

New Member
We are constantly reboots our linux server because we are getting this error:

progress@lidb:/databases> /progress/v10bdlc/bin/proserve /databases/prg/wrk/1600 1/SKYWARD -H lidb -S 16001 -Mm 8192 -Mi 5 -Ma 10 -Mn 40 -Mpb 50 -minport 1026 -m axport 65534 -L 75000
OpenEdge Release 10.1B03 as of Fri Nov 2 22:11:46 EDT 2007
Java Environment not found, using Java free proserve
13:12:33 BROKER Semaphore limit exceeded (1131)
13:12:33 BROKER : Removed shared memory with segment_id: 72810580
13:12:33 BROKER ** This process terminated with exit code 2. (8619)
progress@lidb:/databases>


The only fix we know of is restarting the server, which we can't always do right away. We just restarted it last night at as of right now I just restored a 150mb database and I can't start it because of semaphore error. We are running suse10. Any help would be appreciated. Also we are running progress v10.b.
 

LarryD

Active Member
You need to change the kernel parameter settings.
Code:
ID: ERROR1131
Title: "PROMSGS: Semaphore limit exceeded (1131)"
Created: 10/08/2008 Last Modified: 10/08/2008 Status:

Symptoms:
Semaphore limit exceeded (1131)

Notes:
The maximum number of semaphores, systemwide (SEMMNS) has been exceeded. Reduce the number of active databases, or reduce the number of users (-n) on some of the database. You can also regenerate the kernel with an increased SEMMNS value (See the Operating System Documentation).

and from the Progress guide:

For error 1131, the relevant kernel parameters are SEMMNI and SEMMNS

Table 6–6: Shared Memory and Semaphore Parameter Settings

SEMMNI
Number of semaphore (SEM) IDs; each represents an array of SEMs.
1 per active multi-user database.
SEMMSL
Maximum number of semaphores per SEM ID.
(Max-local-users-on-any-database + Max-#servers-on-any-database + 4).
SEMMNS
Total semaphores in the system.
(SEMMSL x #active-databases).
SEMMNU
Number of semaphore undo structures.
Same value as SEMMNS.
 

TomBascom

Curmudgeon
For Linux you can use the sysctl command or you can write directly to the /proc filesystem:

Code:
# Linux Kernel Parameter settings

LOG=/tmp/kernel.log

SEM=/proc/sys/kernel/sem
SHMMAX=/proc/sys/kernel/shmmax
SHMMNI=/proc/sys/kernel/shmmni
SHMALL=/proc/sys/kernel/shmall
MAXFILE=/proc/sys/fs/file-max

echo "" >> $LOG
date >> $LOG
echo "Current kernel settings:" >> $LOG
( echo -n "Semaphores: " ; cat $SEM ) >> $LOG
( echo -n "SHMMAX: " ; cat $SHMMAX ) >> $LOG
( echo -n "SHMMNI: " ; cat $SHMMNI ) >> $LOG
( echo -n "SHMALL: " ; cat $SHMALL ) >> $LOG
( echo -n "Max open files: " ; cat $MAXFILE ) >> $LOG
( echo -n "File size: " ; ulimit ) >> $LOG
# ( echo -n "User processes: " ; ulimit -u ) >> $LOG
# ( echo -n "User open files: " ; ulimit -n ) >> $LOG

exit

echo 1000 32000 100 100 > $SEM

echo 2147483648 > $SHMMAX
echo 4096 > $SHMMNI
echo 2097152 > $SHMALL

echo 65536 > $MAXFILE

# ulimit -u 16384               # max number of user processes
# ulimit -n 65536               # max number of user open files

echo "" >> $LOG
echo "New kernel settings:" >> $LOG
( echo -n "Semaphores: " ; cat $SEM ) >> $LOG
( echo -n "SHMMAX: " ; cat $SHMMAX ) >> $LOG
( echo -n "SHMMNI: " ; cat $SHMMNI ) >> $LOG
( echo -n "SHMALL: " ; cat $SHMALL ) >> $LOG
( echo -n "Max open files: " ; cat $MAXFILE ) >> $LOG
( echo -n "File size: " ; ulimit ) >> $LOG
# ( echo -n "User processes: " ; ulimit -u ) >> $LOG
# ( echo -n "User open files: " ; ulimit -n ) >> $LOG
 

TomBascom

Curmudgeon
BTW, 10.0B is old and unsupported. You should upgrade.

Your startup parameter settings are a bit "odd" too. -Mi 5? No -B? No -spin?
 

dbacdog

Member
Hey Tom,

New to Linux, my question is what does the values represents for the Semaphores?
1000 32000 100 100

Is that a min, max, avg thing.

Thanks in advance.
 
Top