Board index Linux Linux - Tips&Tricks

Moderator: chandranjoy

How can I increase the number of semaphores?

Postby chandranjoy » Wed Sep 01, 2010 8:54 pm

Symptom:
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 :)
chandranjoy
Site Admin
 
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to Linux - Tips&Tricks

Who is online

Users browsing this forum: No registered users and 1 guest


cron