Service cannot be started due to accumulation of semaphores

(Past correspondence memo) If a service such as Apache cannot be started There is a possibility that the semaphore used for exclusive control has accumulated up to the maximum value.

The following message appears in the log. No space left on device: Couldn't create accept lock

When checking the status of the semaphore

# ipcs -s

It would be suspicious if there were a lot of semaphores for the target service here. You can release the semaphores one by one with this command.

# ipcrm -m <ID>

It may be better to increase the maximum value of the semaphore than that.

Check the maximum value
# /sbin/sysctl -a | grep sem
kernel.sem = 250	32000	32	128
(The maximum value should have meant 128)

/etc/sysctl.Add the following to conf
kernel.sem = 250 32000 32 256
(When increasing the maximum value to 256)

Reflection / confirmation
# /sbin/sysctl -p
# /sbin/sysctl -a | grep sem

Now you can start services that could not be started.

Recommended Posts

Service cannot be started due to accumulation of semaphores
Record of actions to be taken when google_image_download cannot be used
The inaccuracy of Tensorflow was due to log (0)
Summary of examples that cannot be pyTorch backward
What to do if pip cannot be installed
What to do if pvcreate produces a lot of WARNING and cannot be created