#22948 closed Bug (fixed)
Django 1.6, Python3.4, apache2.4, mod_wsgi not working
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Python 3 | Version: | 1.6 |
| Severity: | Normal | Keywords: | python3, apache2, mod_wsgi |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I use the default apache2 configuration from the django docs:
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py WSGIPythonPath /path/to/mysite.com <Directory /path/to/mysite.com/mysite> <Files wsgi.py> Require all granted </Files> </Directory>
together wit this wsgi file:
import os, sys
sys.path.append('/path/to/mysite.com/')
sys.path.append('/path/to/mysite.com/mysite/')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
results in the following apache2 error:
Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:
Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:
Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 1288, in _shutdown
assert tlock is not None
AssertionError:
(...)
[Thu Jul 03 10:22:55.466070 2014] [mpm_prefork:notice] [pid 7939] AH00169: caught SIGTERM, shutting down
The page loads forever, but never displays anything. System: Ubuntu 14.04/ 64bit + libapache2-mod-wsgi-py3
Change History (4)
follow-up: 4 comment:1 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 11 years ago
For Python 3.4 you need to have an update to date mod_wsgi version. Use mod_wsgi 4.2+.
comment:3 by , 10 years ago
comment:4 by , 10 years ago
Replying to anonymous:
I just fixed this issue:
adding
WSGIApplicationGroup %{GLOBAL}to the apache2 configuration fixed it.
I have to decline. This doesn't fixed it for me. Only upgrading the wsgi package or performing an release upgrade seemed to fix this issue.
I just fixed this issue:
adding
WSGIApplicationGroup %{GLOBAL}to the apache2 configuration fixed it.
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py WSGIPythonPath /path/to/mysite.com WSGIApplicationGroup %{GLOBAL} <Directory /path/to/mysite.com/mysite> <Files wsgi.py> Require all granted </Files> </Directory>