Troubleshooting
Problem
The db2diag.log reports a semget, ENOSPC (28) error message.
Symptom
The following message can be seen in the db2diag.log:
2009-11-15-16.18.55.210069+330 E25334773A223 LEVEL: Error (OS)
PID : 47785 TID : 4198246823968PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-17762 APPID: XXX.XXX.XXX
AUTHID : DB2INST1
EDUID : 75 EDUNAME: db2agent (DB1) 0
FUNCTION: DB2 UDB, oper system services, sqloNLCKLock, probe:150
MESSAGE : ZRC=0x8300001C=-2097151972
CALLED : OS, -, semget OSERR: ENOSPC (28)
2009-11-15-16.18.55.210069+330 E25334773A223 LEVEL: Error (OS)
PID : 47785 TID : 4198246823968PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-17762 APPID: XXX.XXX.XXX
AUTHID : DB2INST1
EDUID : 75 EDUNAME: db2agent (DB1) 0
FUNCTION: DB2 UDB, oper system services, sqloNLCKLock, probe:150
MESSAGE : ZRC=0x8300001C=-2097151972
CALLED : OS, -, semget OSERR: ENOSPC (28)
Cause
This error can be seen when DB2 makes a call to semget and semget fails with ENOSPC (28). Details:
ENOSPC - A semaphore set has to be created but the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.
Resolving The Problem
It is best to increase SEMMNI and SEMMNS respectively. From the DB2 Information Center it is recommended that SEMMNS is the result of SEMMSL multiplied by SEMMNI.
max number of arrays = 1024 //SEMMNI
max semaphores per array = 250 //SEMMSL
max semaphores system wide = 256000 //SEMMNS
max ops per semop call = 32
semaphore max value = 32767
If you are on Solaris or HP-UX, it is recommended to run db2osconf.
Example "ipcs -l" output:
------ Semaphore Limits --------
max number of arrays = 1024 //SEMMNI
max semaphores per array = 250 //SEMMSL
max semaphores system wide = 256000 //SEMMNS
max ops per semop call = 32
semaphore max value = 32767
If you are on Solaris or HP-UX, it is recommended to run db2osconf.
Related Information
[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Operating System \/ Hardware - Memory Management","Platform":[{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.7;9.5;9.1","Edition":"Enterprise Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
07 December 2022
UID
swg21407281