Its related to inter process communication, Apache create semaphore array in memory segment, sometimes when you have large number of semaphore array in memory for apache user then it is restarting automatically as new array or cant get the proper memory location to work/ for apache deamon.
provides information on the ipc facilities for which the calling process has read acccess.
However, if you are unsure for using this command you can get the list of semaphore in memory using below mentiond command.
# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 29360128 apache 600 1
0x00000000 29392897 apache 600 1
0x00000000 29425666 apache 600 1
0x00000000 29458435 apache 600 1
0x00000000 29491204 apache 600 1
0x00000000 29523973 apache 600 1
0x00000000 29556742 apache 600 1
0x00000000 29589511 apache 600 1
Here, we see a 8 message queue, all are used by apache users and has permission of 600 rw-rw-rw- "The nsems column os the ipcs command when used with the -s switch indicates the number of semaphores in each semaphore array created in a shared memory segment"
You can get the maximum nuber of semaphore kernel can have using below mentioned command.
# cat /proc/sys/kernel/sem
250 32000 32 128
the last colum "128" is the maximum number of semaphore kernel can have or it will crash.
ipcs -q: Show only message queues
ipcs -s: Show only semaphores
ipcs -m: Show only shared memory
ipcs --help: Additional arguments
The ipcrm command can be used to remove an IPC object from the kernel, for further information about this you can check the tlpd - linux documentation.