Question & Answer
Question
How to increase message queue "process.max-msg-messages" in Solaris 10.x?
Cause
FileNet Image Services Tookkit (ISTK) based custom application is running out of message queues on Solaris with the following error:
Error 202,0,1034: "FNL: msgget for process failed. errno 28
Answer
The error "ENOSPC 28" indicates there is no space left on device. A message queue identifier is to be created, but the system imposed limit on the maximum number of allowed message queue identifiers system wide would be exceeded.
1. Run the command projects -l" it will display : "project.max-msg-ids privileged 128 - deny" for user fnsw
2. Increase this kernel process.max-msg-messages to 2048 using the following procedure:
Increase or verify Solaris 10 operating system kernel limits before installing Process Engine software.
The values of the parameters in the project file override the values of the parameters in the /etc/system file. Make sure that the values of the parameters in the project file are the same as or greater than the values of the parameters in the /etc/system file.
Solaris 10 provides the Resource Control Facility feature for setting kernel parameters. Refer to the Solaris 10 documentation on the Sun Web site for information about this feature. Kernel parameter changes should be made to the Solaris Resource Control Facility whether or not you are using zones in Solaris 10. In a configuration with zones, make these changes in the global zone.
To increase the operating system kernel limits:
1. Log on as fnsw.
2. At a shell prompt enter prctl $$.
3. Verify the values are set to at least the minimum values indicated for Process Engine.
Kernel Parameter | Solaris 10 default | Solaris 10 for Process Engine |
max-sem-nsems | 512 | 1024 |
max-sem-ops | 512 | 1024 |
max-sem-ids | 128 | 2048 |
max-shm-ids | 128 | 2048 |
max-msg-ids | 128 | 2048 |
max-shm-memory | 1/4 Physical memory | 1/4 Physical memory |
max_nprocs | 10 + (16 x maxusers)* | default |
Rlim_fd_max | 65536 | 65536 |
Rlim_fd_cur | 256 | 256 |
Noexec_user_stack | 0 | 1 |
max-msg-qbytes | 65536 | 65536 |
Msgtql (process.max-msg-messages) | 8192 | 65536 |
* maxusers - 2048 or server physical memory (in MB), whichever is less.
4. Logged on as the root user, copy the project and the system file:
- cp /etc/project /etc/project.save
mv /etc/system /etc/system.save
5. View the current settings for the fnsw user, and the Oracle user. For the FileNet software user, enter:
- su - fnsw
projects -l
For Oracle user, enter:
su - oracle
projects -l
6. Return to the user with root privileges.
7. If a project does not exist for the fnsw user, enter the following command to add one:
- projadd -U fnsw -K "project.max-shm-memory=(priv,7G,deny)" user.fnsw
8. If a project does exist for the fnsw user, enter the following command:
- projmod -sK "project.max-shm-memory=(priv,7G,deny)" user.fnsw
Update other kernel parameters required for the fnsw user in /etc/project, for example:
projmod -sK "project.max-shm-ids=(priv,2048,deny)" user.fnsw
projmod -sK "project.max-msg-ids=(priv,2048,deny)" user.fnsw
projmod -sK "project.max-sem-ids=(priv,2048,deny)" user.fnsw
projmod -sK "process.max-msg-messages=(priv,65536,deny)" user.fnsw
projmod -sK "process.max-msg-qbytes=(priv,65536,deny)" user.fnsw
projadd -U fnsw -K "project.max-shm-memory=(priv,7G,deny)" user.fnsw
projmod -sK "project.max-sem-nsems=(priv,1024,deny)" user.fnsw
projmod -sK "project.max-sem-ops=(priv,1024,deny)" user.fnsw
projmod -sK "project.max-device-locked-memory=(priv,3.9G,deny)" user.fnsw
projmod -sK "project.max-shm-ids=(priv,2k,deny)" user.fnsw
projmod -sK "process.max-msg-messages=(priv,1.02k,deny)" user.fnsw
projmod -sK "process.max-sem-ops=(priv,1k,deny)" user.fnsw
projmod -sK "process.max-sem-nsems=(priv,1.02k,deny)" user.fnsw
9. If a project does not exist for the RDBMS software user, such as oracle, enter the following command to create one:
- projadd -U oracle -K
"project.max-shm-memory=(priv,7G,deny)" user.oracle
10. If a project does exist for the RDBMS user, such as oracle, enter the following command:
- projmod -sK
"project.max-shm-memory=(priv,7G,deny)" user.oracle
11. Update the following kernel parameters. These changes are not necessary if the value is already set to a higher value:
- projmod -sK
"project.max-shm-memory=(priv,7G,deny)" user.root
projmod -sK "project.max-shm-memory=(priv,7G,deny)" system
projmod -sK "project.max-shm-memory=(priv,7G,deny)"
default
12. Make a copy of the system file (with a new name):
- cp /etc/system /etc/system.save
13. Edit the /etc/system file, using your preferred editor (for example, vi):
- vi /etc/system
Add the following value to the file:
set noexec_user_stack=1
14. Exit the file and save your changes.
15. Verify the new active kernel values for both FileNet® and Oracle users match the projects -l output displayed in step 5. For fnsw user, enter:
- su - fnsw
prctl $$
For Oracle user, enter:
su - oracle
prctl $$
16. Verify the /etc/system file by entering:
- more /etc/system
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21681530