Problem with MySQLdb and mod_python

John Nagle nagle at animats.com
Fri Jul 18 07:28:06 CEST 2008


Cyril Bazin wrote:
> Thanks for your reply
> 
> The apache log contains lines like :
> 
> [Tue Jul 15 23:31:01 2008] [notice] mod_python (pid=11836,
> interpreter='www.toto.fr'): Importing module
> '/usr/local/apache2/htdocs/intranet/courrier/test.py'
> [Tue Jul 15 23:31:02 2008] [notice] child pid 11836 exit signal
> Segmentation fault (11)
> [Tue Jul 15 23:31:19 2008] [notice] mod_python (pid=11764,
> interpreter='www.toto.fr'): Importing module
> '/usr/local/apache2/htdocs/intranet/courrier/test.py'
> [Tue Jul 15 23:31:19 2008] [notice] child pid 11764 exit signal
> Segmentation fault (11)
> 
> I think the problem comes from the MySQLdb module.
> If I can't find another solution, I think I will downgrade the MySQLdb
> version to 1.2.1

    Sounds like version hell.  mod_python and MySQLdb have to be
compiled with exactly the same compiler for this to work.

    mod_python is usually troublesome.   Python doesn't really have
quite enough isolation to run multiple unrelated instances reliably.
We use FCGI, which has the isolation of CGI but doesn't reload the
application for every transaction.  Also, it's easier to debug if
CPython is crashing.

					John Nagle



More information about the Python-list mailing list