[CentOS] Apache won't start, semaphores exhausted

Wed Oct 5 00:45:10 UTC 2005
Fong Vang <sudoyang at gmail.com>

One of our systems run Apache 2.0.52 (httpd-2.0.52-12.2.ent.centos4
rpm).  The kernel we're running is 2.6.9-11.ELsmp.  After a few weeks
of uptime, Apache refuses to start with the following error in
error.log:

    [crit] (28)No space left on device: mod_jk: could not create jk_log_lock

With Apache not running, there're a lot of semaphores left behind by
Apache, e.g.:

------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x00000000 98304      root      600        1
0x00000000 131073     apache    600        1
0x00000000 163842     apache    600        1
0x00000000 196611     apache    600        1
0x00000000 229380     apache    600        1
0x00000000 786437     root      600        1
...
...
...
/proc/sys/kernel/sem has the following settings:
    250     32000   32      128

Is this an Apache issue or is this a kernel issue?  Why is Apache not
releasing the semaphores?

Thanks for any help.