In OpenEdge, the multi-threaded architecture makes heavy use of file descriptors, shared memory, and semaphores. Allocation of these resources is controlled by system configuration parameters. On most systems, these parameters are set to values appropriate for OpenEdge applications. However, in some cases, one or more parameters might not be set optimally, thereby limiting the number of OpenEdge users. If you have to reset the parameters, you must reconfigure your kernel. See your operating system documentation for information on reconfiguring your operating system kernel.

The optimal parameter settings depend on the system, the application, the number of users, and some minor factors. The following table lists the crucial parameters and provides guidelines for choosing adequate values for each one.

Table 1. Shared memory and semaphore parameter settings
Parameter Meaning Optimal setting
SHMMNI Maximum number of shared memory (SHM) identifiers Current value or system default + (total OpenEdge memory requirement)/SHMMAX
SHMSEG Maximum number of SHM segments a single process can attach 4–8
SHMALL Maximum number of in-use SHM segments System default; increase if many databases are active simultaneously; decreasing -B, -n, and -L startup parameters decreases SHM requirements
SHMMAX Maximum SHM segment size System default; increase if you get OpenEdge error 1135
Note: On the AIX platform, when starting a database with large shared memory requirements (for instance, when the -B exceeds the allotted system paging space), the system may become unstable if the PSALLOC= early environment variable is not set.
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
MAXUMEM Maximum address space for a single user > = server size process + SHMSEG * SHMMAX

The parameter settings in the table are guidelines. Parameter values near these are acceptable in most cases, but a particular system or application might require increasing the limits.

If shared memory or semaphores are allocated incorrectly, OpenEdge displays an error message when it attempts to start an additional user or server. For example, if SEMMNS is set too low, PROSERVE fails and displays the following message:


Server: Semaphore limit exceeded
Server: **The server terminated with exit code (X) (800)

Change the relevant parameter values and reconfigure the kernel in response to semaphore or shared-memory errors at startup. The following table lists the parameters that you might have to raise in response to various OpenEdge error codes.

Table 2. Error codes and kernel reconfiguration parameters
Error code Parameter to increase
1081 SEMMNU
1093 SEMMSL or SEMMNS
1130 SEMMSL
1131 SEMMNI and SEMMNS
1135 SHMMAX, MAXUMEM, and MAXUPOn the AIX platform, when starting a database with large shared memory requirements (for instance, when the -B exceeds the allotted system paging space), the system may become unstable if the PSALLOC= early environment variable is not set.
1137 SHMMNI
1175 SHMSEG, MAXUMEM, and MAXUP
1195 SEMMNS
Note: The Blocks in Database Buffers (-B), Lock-table Entries (-L), and Number of Users (-n) startup parameters all affect shared-memory usage. The Number of Users (-n) and Maximum Servers (-Mn) parameters affect semaphore usage (each user or server process uses one semaphore). Before reconfiguring your kernel to increase shared memory or semaphore allocation, see whether you can lower these startup values.