[mod_python] ValueError: Failed to acquire global mutex lock

Graham Dumpleton graham.dumpleton at gmail.com
Wed Oct 24 23:04:05 EDT 2007


Going by errors posted by someone else for other thread, seems that if
semaphores exhausted, error would occur at mod_python startup not when
locking the mutex.

I'll have to go back and read all your emails again. You said you were
using 'worker' MPM now didn't you. Your not using some strange MPM
like perchild or ITK-MPM are you. I know that these cause problems for
these mutexes in mod_python because of how different processes wanting
to lock the mutex run as different users.

Graham

On 24/10/2007, Michael Robokoff <mike.robokoff at apioutsourcing.com> wrote:
> # ipcs
> IPC status from <running system> as of Wed Oct 24 06:25:17 CDT 2007
> T         ID      KEY        MODE        OWNER    GROUP
> Message Queues:
> Shared Memory:
> Semaphores:
> s          2   0          --ra-------      api    other
>
> Not sure how to read that.
>
> If the problem is the semaphores, Shouldn't I be able to use the following
> set semsys:seminfo_semmni=2048
> set semsys:seminfo_semmns=2048
> set semsys:seminfo_semmnu=1024
> set semsys:seminfo_semmsl=300
> set semsys:seminfo_semopm=128
> set semsys:seminfo_semume=64
>
> to make more semaphores available?
>
> I tried that but it didn't change anything, do you think that was not
> enough?
>
>
> --Mike
>
>
> -----Original Message-----
> From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com]
> Sent: Tuesday, October 23, 2007 7:08 PM
> To: Michael Robokoff
> Cc: mod_python
> Subject: Re: [mod_python] ValueError: Failed to acquire global mutex lock
>
> If you run 'ipcs' what is the output? Something must be using all the
> semaphores, can't be anything else.
>
> Graham
>
> On 24/10/2007, Michael Robokoff <mike.robokoff at apioutsourcing.com> wrote:
> > Ok the directive did take effect as the log entry below shows:
> >
> > [Tue Oct 23 07:20:32 2007] [notice] mod_python: Creating 4 session mutexes
> > based on 6 max processes and 25 max threads.
> > [Tue Oct 23 07:20:32 2007] [notice] mod_python: using mutex_directory /tmp
> >
> >
> > Still see this however:
> >
> > ValueError: Failed to acquire global mutex lock
> >
> > I will try recompiling with the option you mentioned and see what happens.
> >
> >
> > --Mike
> >
> >
> > -----Original Message-----
> > From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com]
> > Sent: Tuesday, October 23, 2007 6:40 AM
> > To: Michael Robokoff
> > Cc: mod_python
> > Subject: Re: [mod_python] ValueError: Failed to acquire global mutex lock
> >
> > On 23/10/2007, Michael Robokoff <mike.robokoff at apioutsourcing.com> wrote:
> > > [Thu Oct 18 07:37:38 2007] [notice] mod_python: Creating 8 session
> mutexes
> > > based on 6 max processes and 25 max threads.
> >
> > BTW, what did you end up setting mod_python.mutex_locks to? If you use
> > 4 like I said, then it can't have been in correct part of Apache
> > configuration, outside of all VirtualHost, as error log still shows '8
> > session mutexes'.
> >
> > if you can't get this to work, you might rebuild mod_python and
> > specific --with-max-locks=4 option to configure to force lower value
> > to be compiled in.
> >
> > Graham
> >
> >
> >
>
>
>


More information about the Mod_python mailing list