Question

After installing mod_python and changing the

/etc/apache2/sites-available/default
file.I am getting following error when I try to run

tail -f /var/log/apache2/error.log
ai-System-Product-Name ws_code # tail -f /var/log/apache2/error.log
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
Fatal Python error: PyEval_AcquireThread: NULL new thread state
[Fri May 24 16:45:29 2013] [notice] caught SIGTERM, shutting down
[Fri May 24 16:45:30 2013] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Fri May 24 16:45:30 2013] [notice] mod_python: using mutex_directory /tmp 
[Fri May 24 16:45:30 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.2 mod_python/3.3.1 Python/2.7.3 mod_wsgi/3.4 configured -- resuming normal operations

Moreover now whenever I try to run my code on browser It just directly shows the original code only . How to remove the error ? I am using Linux Mint 14 Nadia .

Was it helpful?

Solution

The mod_python package is no longer developed or supported and has not been updated in many years. If it still works with the latest Python 2.X versions you would be lucky. The mod_python package doesn't use the Python threading APIs properly. In Python 3.X they changed the obligations on how the threading API is used. If any of that got back ported to Python 2.7, then mod_python would likely break because of its incorrect threading API usage.

Short answer is that you don't want to be using mod_python these days.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top