httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Dumpleton" <graham.dumple...@gmail.com>
Subject Re: OS/X + Cisco VPN == trouble
Date Fri, 24 Aug 2007 09:50:19 GMT
BTW, I totally forgot to join the dots and point out the following
configuration option for mod_python to drop the number of mutex locks
it uses.

    /* On some systems the locking mechanism chosen uses valuable
       system resources, notably on RH 8 it will use sysv ipc for
       which Linux by default provides only 128 semaphores
       system-wide, and on many other systems flock is used, which
       results in a relatively large number of open files.

       The maximum number of locks can be specified at
       compile time using "./configure --with-max-locks value" or
       at run time with "PythonOption mod_python.mutex_locks value".

       If the PythonOption directive is used, it must be in a
       server config context, otherwise it will be ignored.

       The optimal number of necessary locks is not clear, perhaps a
       small number is more than sufficient - if someone took the
       time to run some research on this, that'd be most welcome!
    */

Thus perhaps just tell mod_python to use less locks.

Graham

On 24/08/07, Graham Dumpleton <graham.dumpleton@gmail.com> wrote:
> On 24/08/07, Ian Holsman <lists@holsman.net> wrote:
> > Graham Dumpleton wrote:
> > > On 24/08/07, Ian Holsman <lists@holsman.net> wrote:
> > >
> > >> Hi.
> > >>
> > >> This one is frustrating me to no end, and was wondering if some BSD/OSX
> > >> guru can help  me out a bit.
> > >>
> > >> I'm using the trunk, and trying to start apache, but I keep getting a
> > >> lock/sem problem
> > >>
> > >> [Fri Aug 24 10:51:53 2007] [emerg] (28)No space left on device: Couldn't
> > >> create accept lock
> > >>
> > >> this only happens if I have run the VPN. when I reboot it works great
> > >> (until I check into the VPN).
> > >>
> > >> from what I can see this error is usually caused by running out of
> > >> sempahores, but ipcs doesn't show any.
> > >> and to make matters worse, it only started happening about 2 weeks ago.
> > >>
> > >
> > > As a workaround while you resolve why you are running out of mutexes
> > > and/or how to increase the number, use AcceptMutex directive to have
> > > it use a different mutex mechanism.
> > >
> > >   http://httpd.apache.org/docs/2.2/mod/mpm_common.html#acceptmutex
> > >
> > > This question was perhaps more appropriate for user list and not
> > > developers list.
> > >
> > > Graham
> > >
> > >
> > Thanks Graham,
> >
> > I'll remember the users list in the future. as I was using the trunk, I
> > thought it might have been a recent patch to apr/httpd which has caused
> > it, thats all.
> >
> > BTW.. the acceptmutex works for stock apache, but not for mod_python
> > which doesn't have the ability to change the mutex mechanism it uses.
>
> For mod_python problem see:
>
>   https://issues.apache.org/jira/browse/MODPYTHON-202
>
> Suggested quick think right at end.
>
> If only using mod_python to host Python WSGI applications and not
> using mod_python specific features at all, consider using mod_wsgi
> instead. The mod_wsgi module will work as it is the global mutexes
> that mod_python creates for session management that cause the problem
> and mod_wsgi doesn't have such high level features, only supporting
> basic WSGI interface.
>
> Graham
>

Mime
View raw message