No space left on device: Couldn’t create accept lock |OR| (28)No space left on device: AH00023: Couldn’t create the ssl-cache mutex

If in the apache error log you are getting this:

(28)No space left on device: AH00023: Couldn't create the ssl-cache mutex 

Stop Apache.

Then check if there’s a lot of Apache semaphores by running: ipcs -s

For example:

# ipcs -s

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x00000000 19398656   apache     600        1         
0x00000000 19431425   apache     600        1         
0x00000000 15892482   apache     600        1         
0x00000000 19464195   apache     600        1         
0x00000000 19496964   apache     600        1         
0x00000000 45907973   apache     600        1         
0x00000000 19529734   apache     600        1         
0x00000000 46596103   apache     600        1         
0x00000000 46628872   apache     600        1         
0x00000000 46661641   apache     600        1         
0x00000000 46694410   apache     600        1         
0x00000000 46727179   apache     600        1         
0x00000000 46759948   apache     600        1         
0x00000000 46792717   apache     600        1         
0x00000000 47677454   apache     600        1         
0x00000000 47710223   apache     600        1         
0x00000000 47742992   apache     600        1         
0x00000000 47775761   apache     600        1         
0x00000000 47808530   apache     600        1         
0x00000000 47841299   apache     600        1         
0x00000000 47874068   apache     600        1         
0x00000000 47972373   apache     600        1         
0x00000000 48005142   apache     600        1         
0x00000000 48037911   apache     600        1         
0x00000000 48070680   apache     600        1         
0x00000000 48103449   apache     600        1         
0x00000000 48136218   apache     600        1         
0x00000000 48168987   apache     600        1         
0x00000000 48267292   apache     600        1         
0x00000000 48300061   apache     600        1         
0x00000000 48332830   apache     600        1         
0x00000000 48365599   apache     600        1         
0x00000000 48398368   apache     600        1         
0x00000000 48431137   apache     600        1         
0x00000000 48463906   apache     600        1         
0x00000000 11436067   root       666        3         
0x00000000 19562532   apache     600        1         
0x00000000 19595301   apache     600        1         
0xd95b59b9 11599910   root       666        2         
0x00000000 20086823   apache     600        1         
0x000003d4 11665448   root       644        1         
0x00000000 20119593   apache     600        1         
0x00000000 20152362   apache     600        1         
0x00000000 20185131   apache     600        1         
0x00000000 20217900   apache     600        1         
0x00000000 20250669   apache     600        1         
0x00000000 20283438   apache     600        1         
0x00000000 22347823   apache     600        1         
0x00000000 22380592   apache     600        1         
0x00000000 22413361   apache     600        1         
0x00000000 22446130   apache     600        1         
0x00000000 22478899   apache     600        1         
0x00000000 22511668   apache     600        1         
0x00000000 23232565   apache     600        1         
0x00000000 25493558   apache     600        1         
0x00000000 25526327   apache     600        1         
0x00000000 25559096   apache     600        1         
0x00000000 25591865   apache     600        1         
0x00000000 25624634   apache     600        1         
0x00000000 25657403   apache     600        1         
0x00000000 25690172   apache     600        1         
0x00000000 26574909   apache     600        1         
0x00000000 26607678   apache     600        1         
0x00000000 26640447   apache     600        1         
0x00000000 26673216   apache     600        1         
0x00000000 26705985   apache     600        1         
0x00000000 26738754   apache     600        1         
0x00000000 33620035   apache     600        1         
0x00000000 33718340   apache     600        1         
0x00000000 33751109   apache     600        1         
0x00000000 33783878   apache     600        1         
0x00000000 33816647   apache     600        1         
0x00000000 33849416   apache     600        1         
0x00000000 33882185   apache     600        1         
0x00000000 33914954   apache     600        1         
0x00000000 34013259   apache     600        1         
0x00000000 34046028   apache     600        1         
0x00000000 34078797   apache     600        1         
0x00000000 34111566   apache     600        1         
0x00000000 34144335   apache     600        1         
0x00000000 34177104   apache     600        1         
0x00000000 34209873   apache     600        1         
0x00000000 34308178   apache     600        1         
0x00000000 34340947   apache     600        1         
0x00000000 34373716   apache     600        1         
0x00000000 34406485   apache     600        1         
0x00000000 34439254   apache     600        1         
0x00000000 34472023   apache     600        1         
0x00000000 34504792   apache     600        1         
0x00000000 36569177   apache     600        1         
0x00000000 36601946   apache     600        1         
0x00000000 36634715   apache     600        1         
0x00000000 36667484   apache     600        1         
0x00000000 36700253   apache     600        1         
0x00000000 36733022   apache     600        1         
0x00000000 36765791   apache     600        1         
0x00000000 37060704   apache     600        1         
0x00000000 37093473   apache     600        1         
0x00000000 37126242   apache     600        1         
0x00000000 37159011   apache     600        1         
0x00000000 37191780   apache     600        1         
0x00000000 37224549   apache     600        1         
0x00000000 37257318   apache     600        1         
0x00000000 38731879   apache     600        1         
0x00000000 38764648   apache     600        1         
0x00000000 38797417   apache     600        1         
0x00000000 38830186   apache     600        1         
0x00000000 38862955   apache     600        1         
0x00000000 38895724   apache     600        1         
0x00000000 38928493   apache     600        1         
0x00000000 40009838   apache     600        1         
0x00000000 40042607   apache     600        1         
0x00000000 40075376   apache     600        1         
0x00000000 40108145   apache     600        1         
0x00000000 40140914   apache     600        1         
0x00000000 40173683   apache     600        1         
0x00000000 48758900   apache     600        1         
0x00000000 48791669   apache     600        1         
0x00000000 48824438   apache     600        1         
0x00000000 48857207   apache     600        1         
0x00000000 48889976   apache     600        1         
0x00000000 48922745   apache     600        1         
0x00000000 49381498   root       600        1         
0x00000000 49414267   root       600        1         
0x00000000 49447036   root       600        1         
0x00000000 49283197   root       600        1         
0x00000000 49217662   root       600        1         
0x00000000 49250431   root       600        1         

If there are a lot, then run the command below to clear those semaphores out:

# for i in $(ipcs -s | grep 'httpd\|apache\|www-data' | awk '{print $2}'); do ipcrm -s $i; done

Check that they’ve cleared out by running: ipcs -s

Example:

# ipcs -s

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x00000000 11436067   root       666        3         
0xd95b59b9 11599910   root       666        2         
0x000003d4 11665448   root       644        1         
0x00000000 49381498   root       600        1         
0x00000000 49414267   root       600        1         
0x00000000 49447036   root       600        1         
0x00000000 49283197   root       600        1         
0x00000000 49217662   root       600        1         
0x00000000 49250431   root       600        1         

Then start Apache again.

Violia. Fixed!