Introduction

The error “No space left on device: Couldn’t create accept lock” in Apache usually indicates that system semaphore limits are exhausted. This can be resolved by clearing unused semaphores and increasing kernel limits.


Prerequisites

  • Root SSH access to the server
  • Basic knowledge of Linux commands
  • Access to system configuration files

Implementation

Step 1: Remove unused semaphores
for semid in ipcs -s | grep apachec | cut -f2 -d” “; do ipcrm -s $semid; done


Step 2: Check current limits
ipcs -l


Step 3: Edit kernel parameters
vi /etc/sysctl.conf

Add or update the following values:

kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024


Step 4: Apply changes
sysctl -p


Conclusion

By clearing unused semaphores and increasing kernel limits, you can resolve the Apache accept lock error and ensure stable server performance.

Leave a Reply