Semaphore usage Error 1131

Posted by mikaelstenmark on 11-Oct-2017 07:28

Hi

We have quite a few test databases on a Linux machine. 66 test and development databases. When we try to start all databases, we get the error message 1131. And only 45 of 66 databases started. As we reduced the number of users from 101 to 50, the number of semaphores seen in Promon decreased from 121 to 71. After the change we get the same error message and the number of databases that are started is still 45, despite the fact that the databases require fewer semaphores. Is there anyone who can explain this behavior. I thought the number of semaphore required would decrease by the change of -n. We run OpenEdge version 11.7.1 on a Redhat 7.3 machine

Regards Mikael Stenmark

Posted by Valeriy Bashkatov on 11-Oct-2017 07:49

Hi,

[quote user="ProKB"]

Progress and UNIX Semaphores:

Progress uses UNIX Semaphores to synchronize the activities of server processes and self-service client processes that are connected to a database. Semaphores are created and initialized by the Database broker when the database is started.

UNIX semaphores are grouped into semaphore sets. Each semaphore set has a unique identifying number called a semid. Within a semaphore set, individual semaphores are identified by an integer that ranges from 0 to one less than the size of the semaphore set.

The Database Broker creates a semaphore set when the database is started. The original recommended size of the semaphore set is the number of users (-n parameter) plus the number of servers (-Mn parameter) plus 4, however, the newer versions have added more auxiliary processes. 

The number of semaphores within a semaphore set (SEMMSL) is determined by the -n and -Mn startup parameter for each database. Progress auxiliary process need to be included in the Maximum Users (-n) count, i.e. APWs, AIW,BIW, WDOG, replication process, online backup, promon sessions, etc..

The amount of kernel memory required for semaphores is relatively small, so setting the limits higher than current needs probably won't affect performance. 

Semaphores are not used for single user sessions. Clients that connect to a remote database on a server machine do not use semaphores on the client machine.

Recommended Semaphores Settings:

SEMMNI:  (Maximum number of semaphore identifiers)

SEMMNI =Three semsets per active Enterprise database, otherwise one. The multiple semaphore sets feature is only available with the Enterprise Database Server product.

When SEMMNI is exceeded errors such as “Progress Error Semaphore limit exceeded (1131)” arise.

SEMMSL: (Maximum number of semaphores per set)

SEMMSL = Maximum number of users on any database plus (+) the maximum number of remote servers for any database plus (+) 4 plus (+) the number auxiliary process. 

When SEMMSL is exceeded errors such as 
Warning: only <num> wait semaphores are available. (1093)
Less than minimum number of semaphores available (1130)

SEMMNS: (Maximum number of semaphores system-wide)

SEMMNS = SEMMSL multiply by (*) the number of active databases. 

When SEMMNS is exceeded the following errors arise:
Warning: only <num> wait semaphores are available. (1093)
Semaphore limit exceeded (1131)
No available wait semaphore. (1195)

SEMMNU:

SEMMNU = SEMMNS

When SEMMNS is exceeded the following errors arise:
Too many users requested semaphore undo, increase SEMMNU. (1081)

MAXUMEM: Maximum amount of memory that will be used to run a process

Typically needs increasing when SHMMAX, SHMSEG are raised.

[/quote]

knowledgebase.progress.com/.../P61278

Posted by George Potemkin on 11-Oct-2017 07:56

Your database are hitting the SEMMNI kernel limit. Increase SEMMNI or decreasr the -semsets at db startup.

All Replies

Posted by Valeriy Bashkatov on 11-Oct-2017 07:49

Hi,

[quote user="ProKB"]

Progress and UNIX Semaphores:

Progress uses UNIX Semaphores to synchronize the activities of server processes and self-service client processes that are connected to a database. Semaphores are created and initialized by the Database broker when the database is started.

UNIX semaphores are grouped into semaphore sets. Each semaphore set has a unique identifying number called a semid. Within a semaphore set, individual semaphores are identified by an integer that ranges from 0 to one less than the size of the semaphore set.

The Database Broker creates a semaphore set when the database is started. The original recommended size of the semaphore set is the number of users (-n parameter) plus the number of servers (-Mn parameter) plus 4, however, the newer versions have added more auxiliary processes. 

The number of semaphores within a semaphore set (SEMMSL) is determined by the -n and -Mn startup parameter for each database. Progress auxiliary process need to be included in the Maximum Users (-n) count, i.e. APWs, AIW,BIW, WDOG, replication process, online backup, promon sessions, etc..

The amount of kernel memory required for semaphores is relatively small, so setting the limits higher than current needs probably won't affect performance. 

Semaphores are not used for single user sessions. Clients that connect to a remote database on a server machine do not use semaphores on the client machine.

Recommended Semaphores Settings:

SEMMNI:  (Maximum number of semaphore identifiers)

SEMMNI =Three semsets per active Enterprise database, otherwise one. The multiple semaphore sets feature is only available with the Enterprise Database Server product.

When SEMMNI is exceeded errors such as “Progress Error Semaphore limit exceeded (1131)” arise.

SEMMSL: (Maximum number of semaphores per set)

SEMMSL = Maximum number of users on any database plus (+) the maximum number of remote servers for any database plus (+) 4 plus (+) the number auxiliary process. 

When SEMMSL is exceeded errors such as 
Warning: only <num> wait semaphores are available. (1093)
Less than minimum number of semaphores available (1130)

SEMMNS: (Maximum number of semaphores system-wide)

SEMMNS = SEMMSL multiply by (*) the number of active databases. 

When SEMMNS is exceeded the following errors arise:
Warning: only <num> wait semaphores are available. (1093)
Semaphore limit exceeded (1131)
No available wait semaphore. (1195)

SEMMNU:

SEMMNU = SEMMNS

When SEMMNS is exceeded the following errors arise:
Too many users requested semaphore undo, increase SEMMNU. (1081)

MAXUMEM: Maximum amount of memory that will be used to run a process

Typically needs increasing when SHMMAX, SHMSEG are raised.

[/quote]

knowledgebase.progress.com/.../P61278

Posted by George Potemkin on 11-Oct-2017 07:56

Your database are hitting the SEMMNI kernel limit. Increase SEMMNI or decreasr the -semsets at db startup.

Posted by Valeriy Bashkatov on 11-Oct-2017 08:31

Strangely enough, my answer disappeared somewhere. [:S]

Posted by mikaelstenmark on 12-Oct-2017 06:42

I increased the value of SEMMNI and it solved the problem. Thanks for the tip Valeriy and George.

/micke

This thread is closed