[CentOS] Apache won't start, semaphores exhausted

Wed Oct 5 01:05:50 UTC 2005
Fong Vang <sudoyang at gmail.com>

On 10/4/05, Craig White <craigwhite at azapple.com> wrote:
> On Tue, 2005-10-04 at 17:45 -0700, Fong Vang wrote:
> > 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?
> ----
> my guess is that you are out of space on partition containing /var
>
> try command line...
>
> df -h
>
> see what 'No space on device' actually means

Space is not the issue.  That's the first thing I checked.  It's
definitely because the system ran out of semaphores.  After I cleared
out the semaphores belonging to Apache, it started again.

I need to understand why Apache is not releasing the semaphores on
shutdown (or why the system does not release the semaphore if Apache
is no longer running).

> Craig
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>