CentOS 7.x Increase Inter Process Communication (IPC) limits
From Notes_Wiki
Home > CentOS > CentOS 7.x > System Administration > Inter Process Communication IPC settings > CentOS 7.x Increase Inter Process Communication (IPC) limits
If increasing number of processes or threads or concurrency in an application is leading to application stability issues due to IPC limits.
For example below logs indicate postgresql failing due to semaphore limit.
< 2018-03-29 16:54:31.667 IST >FATAL: could not create semaphores: No space left on device < 2018-03-29 16:54:31.667 IST >DETAIL: Failed system call was semget(5432129, 17, 03600). < 2018-03-29 16:54:31.667 IST >HINT: This error does *not* mean that you have run out of disk space. It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded. You need to raise the respective kernel parameter. Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter. The PostgreSQL documentation contains more information about configuring your system for PostgreSQL.
Then we can edit '/etc/sysctl.conf' and append following values:
#Example for a computer with 16GB of RAM: kernel.shmmni=4096 kernel.shmmax=17179869184 kernel.shmall=8388608 #kernel.sem=<SEMMSL> <SEMMNS> <SEMOPM> <SEMMNI> kernel.sem=250 1024000 32 4096 kernel.msgmni=16384 kernel.msgmax=65536 kernel.msgmnb=65536
followed by
sysctl -p
so that the error gets resolved.
Refer:
Home > CentOS > CentOS 7.x > System Administration > Inter Process Communication IPC settings > CentOS 7.x Increase Inter Process Communication (IPC) limits