A Red Hat Enterprise Linux Server running Apache crashes after about a day or so of running. Using the ipcs command it was discovered that the server crashes once Apache has used 100 out of 128 semaphores.
Solution:
Before beginning, check the defaults so they can be referenced later. To view the current semaphore settings, use the cat command:
# cat /proc/sys/kernel/sem
250 32000 32 128
The following is an example of how to make these adjustments permanent.
Edit the /etc/sysctl.conffile by adding:
kernel.sem = 250 32000 32 256
Note: the '=' (is (space)=(space)) - spaces are important in this file. There should be a space before and after the equals (=) sign.
Issue the sysctl -p command to make these changes take effect immediately. Setting the values in this file will also save them for future system reboots.
Enjoy
