[mod_python] Using mod_python Berkeley DB XML, XmlManager, with MacOSX Tiger/Leopard/SnowLeopard (again)

Graham Dumpleton graham.dumpleton at gmail.com
Tue Dec 15 19:34:03 EST 2009


Are you definitely using PythonInterpreter set to 'main_interpreter'?

Are you stuck with using mod_python? Any way you can use mod_wsgi?

Since been discovered that even in main interpreter, mod_python's
usage of GIL thread state APIs is wrong. The mod_wsgi module gets it
right, although still have to tell mod_wsgi to use main interpreter as
well to avoid other issues.

Graham

2009/12/16 Peter Robinson <p.m.robinson at bham.ac.uk>:
> Folks
> Last March there was a thread on the problems of getting mod_python running
> with Apache in Mac OSX, with a very thorough discussion by Graham Dumpleton
> a.o. on how to make it work.  (see
> http://www.modpython.org/pipermail/mod_python/2008-March/024955.html ; also
> http://www.modpython.org/pipermail/mod_python/2007-October/024376.html).
>  This discussion should have solved the issue forever.  Alas, it has not ..
> for me anyway.
> In trying to run mod_python with Berkeley DB XML, in the mod_wsgi
> incarnation, an older problem has resurfaced.  This is to do with Apache
> locking up when python tries to access the key XmlManager class in bdbxml. A
> discussion on this list
> http://www.modpython.org/pipermail/mod_python/2007-April/023445.html , under
> the topic Global Interpreter Lock problem with Berkeley DB XML and
> mod_python, dealt with this.  Graham (again) suggested two fixes:
> 1. recompile bdbxml with the compiler option -DSWIG_PYTHON_NO_USE_GIL
> 2.  reinstall the python bindings, editing dbxml/dist/s_swig so that
> '-threads' isn't in swig_args for Python
> I tried the second, and this changed nothing.  I cannot figure out how to do
> the first (sh buildall.sh  --with-berkeleydb-conf=-DSWIG_PYTHON_NO_USE_GIL
> and sh buildall.sh  --with-dbxml-conf=-DSWIG_PYTHON_NO_USE_GIL fail)...
> so help would be really helpful!
> I am trying to do this on SnowLeopard.



More information about the Mod_python mailing list