11π
This is covered by the mod_wsgi documentation.
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API
In short, you are likely using a Python extension module which is not implemented to work properly in a Python sub interpreter. That or the extension module is not releasing the GIL properly when doing blocking operations. Both can result in an interpreter deadlock.
Use the solution in the documentation and see if that helps.
3π
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
ServerAdmin raghav@xyz.com
<Directory /var/www/mysite/mysite>
AddHandler wsgi-script .py
Options +ExecCGI
</Directory>
DocumentRoot /var/www/mysite
WSGIDaemonProcess myproject python-path=/var/www/mysite:/var/www/environ/lib/python2.7/site-packages
#WSGIProcessGroup mysite
WSGIScriptAlias / /var/www/mysite/mysite/wsgi.py
WSGIApplicationGroup %{GLOBAL}
<Directory /var/www/mysite/mysite/>
order deny,allow
Allow from all
</Directory>
I also had the same error and I have solved this issue by using this configuration.
Also add the following line to /etc/apache2/apache.config
#WSGIPythonPath /var/www/mysite
- Can i access the response context of a view tested without the test client?
- Add timestamp and username to log
- Best way to add additional fields to django-rest-framework ModelViewSet when create
- Find out the currently logged in user in Django
- Django's HttpResponseRedirect is http instead of https
3π
I am aware this thread is three years old but I stumbled across it when I had a similar issue so I thought I would add my solution. In my case it was something in the virtual environment that required mod_ssl to be enabled in Apache even though none of the sites used SSL (well they do but it is terminated elsewhere). So
a2enmod ssl
service apache2 restart
Fixed it.
1π
After digging through the answers above. I had to set the number of processes from 5 to 1. Also using the multi worker mpm.
LoadModule mpm_worker_module modules/mod_mpm_worker.so
WSGIDaemonProcess music user=apache group=apache processes=1 threads=30 python-path=/srv/www/music/service/venv/lib/python2.7/site-packages
- DJANGO β local variable 'form' referenced before assignment
- Django styling login forms and adding additional spans
- Django calendar free/busy/availabilitty