Apache Mod-Python - Commented: (MODPYTHON-202) Allow mechanism used by global

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > November 2006 > Commented: (MODPYTHON-202) Allow mechanism used by global





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-202) Allow mechanism used by global
Graham Dumpleton (JIRA)

2006-11-13, 8:13 am

[ http://issues.apache.org/jira/brows...action_12448585 ]

Graham Dumpleton commented on MODPYTHON-202:
--------------------------------------------

A configuration option can possibly be modelled off how the AcceptMutex directive for Apache works. Ie:

http://httpd.apache.org/docs/2.2/mo...tml#acceptmutex

Would just need to decide whether we do it as a PythonOption or introduce a new directive instead.

Note there is an interesting comment in there about using pthread which may be relevant to the problem you are seeing. Specifically:

On most systems, when the pthread option is selected, if a child process terminates
abnormally while holding the AcceptCntl mutex the server will stop responding to
requests. When this occurs, the server will require a manual restart to recover.

Solaris is a notable exception as it provides a mechanism, used by Apache, which
usually allows the mutex to be recovered after a child process terminates abnormally
while holding a mutex.

If your system implements the pthread_mutexattr_setrobust_np() function, you may
be able to use the pthread option safely.

> Allow mechanism used by global mutex locks to be specified.
> -----------------------------------------------------------
>
> Key: MODPYTHON-202
> URL: http://issues.apache.org/jira/browse/MODPYTHON-202
> Project: mod_python
> Issue Type: New Feature
> Components: core
> Affects Versions: 3.2.10
> Reporter: Graham Dumpleton
>
> When using experimental Apache ITK MPM, described at:
> http://home.samfundet.no/~sesse/mpm-itk/
> global mutex locks will fail if Apache used semaphores because requests against different virtual hosts run as different users and user will not have permission to access the semaphore to lock it. See:
> http://www.modpython.org/pipermail/...ber/022536.html
> for original mailing list post about this from Sam Morris.
> A suggested fix of finding a specific mechanism that works rather than default used by Apache, seems to work:
> http://www.modpython.org/pipermail/...ber/022537.html
> http://www.modpython.org/pipermail/...ber/022538.html
> http://www.modpython.org/pipermail/...ber/022539.html
> If available MPMs with such constraints are going to appear, may make sense to have an option to configure which allows one to override at compile time the default mechanism used for global mutex locks so that it can be made to match what may be require

d for a specific MPM that Apache is compiled to use.

Jim Gallacher

2006-11-13, 8:13 am

Graham Dumpleton (JIRA) wrote:
> [ http://issues.apache.org/jira/brows...action_12448585 ]
>
> Graham Dumpleton commented on MODPYTHON-202:
> --------------------------------------------
>
> A configuration option can possibly be modelled off how the AcceptMutex directive for Apache works. Ie:
>
> http://httpd.apache.org/docs/2.2/mo...tml#acceptmutex
>
> Would just need to decide whether we do it as a PythonOption or introduce a new directive instead.


We seem to be going pretty far down the road with PythonOption and our
new namespace, so I'm inclined to stick with that, unless there is some
sort of performance implication.

Jim

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com