9๐
I had a similar issue and found a fix -> just add to your apache configuration:
WSGIScriptAlias application-group=%{GLOBAL}
Apparently it happens when you have an extension module not designed to work in sub interpreter. The above forces it to run in main interpreter.
Sources:
django apache mod-wsgi hangs on importing a python module from .so file
http://blog.rtwilson.com/how-to-fix-flask-wsgi-webapp-hanging-when-importing-a-module-such-as-numpy-or-matplotlib/
๐คHugo Flick
3๐
Wrong
imagePath = os.path.dirname(__file__) + "/1.jpg"
Right
from os.path import abspath, join, dirname
imagePath = abspath( join(dirname(__file__), "1.jpg") )
๐คb1_
0๐
Just wanted to add to this thread.
My /etc/apache2/sites-available/default-ssl.conf needed a little more than just the WSGIScriptAlias application-group=%{GLOBAL}.
I had to add it to the end of my existing definition of the variable
WSGIScriptAlias / /home/me/my_project/my_project/wsgi.py application-group=%{GLOBAL}
๐คScrimpy
Source:stackexchange.com