Getting a 502 bad gateway problem on a recently updated (from Django 1.3 to 1.5) wsgi/Django app.
Here's my httpd.conf:
ServerRoot "/home/xxxx/webapps/xxxx_d15/apache2"
LogLevel info
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule wsgi_module modules/mod_wsgi.so
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/xxxx/logs/user/access_xxxx_d15.log combined
ErrorLog /home/xxxx/logs/user/error_xxxx_d15.log
KeepAlive Off
Listen 34368
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess xxxx_d15 processes=2 threads=12 python-path=/home/xxxx/webapps/xxxx_d15:/home/xxxx/webapps/xxxx_d15/lib/python2.7
WSGIProcessGroup xxxx_d15
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIScriptAlias / /home/xxxx/webapps/xxxx_d15/xxxx.wsgi
And here's my xxxx.wsgi:
import os
import sys
sys.path.insert(0, '/home/xxxx/wepapps/xxxx_d15')
sys.path.insert(0, '/home/xxxx/webapps/xxxx_d15/xxxx')
from django.core.handlers.wsgi import WSGIHandler
os.environ['DJANGO_SETTINGS_MODULE'] = 'xxxx.settings'
application = WSGIHandler()
What's odd is that this works on another server I have. This server has a previous app (named 'xxxx' w/out the '_d15' suffix) that also worked. This is a newly created Django 1.5 app (on WebFaction) that I'm dropping my existing (code-updated) Django app into. I'm fairly confident that my code is fine. It's running on a Django 1.5 app on another server.
Right now I'm getting a 502 bad gateway error on this one. Logging doesn't seem to be providing much help here:
[Sun Sep 22 17:15:18 2013] [notice] caught SIGTERM, shutting down
[Sun Sep 22 17:15:23 2013] [warn] mod_wsgi: Compiled for Python/2.7.3.
[Sun Sep 22 17:15:23 2013] [warn] mod_wsgi: Runtime using Python/2.7.5.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18993): Starting process 'xxxx_d15' with threads=12.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18993): Initializing Python.
[Sun Sep 22 17:15:23 2013] [notice] Apache/2.2.17 (Unix) mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18994): Starting process 'xxxx_d15' with threads=12.
[Sun Sep 22 17:15:23 2013] [info] Server built: Aug 30 2012 16:40:14
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18994): Initializing Python.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18993): Attach interpreter ''.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18994): Attach interpreter ''.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18993): Adding '/home/xxxx/webapps/xxxx_d15' to path.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18993): Adding '/home/xxxx/webapps/xxxx_d15/lib/python2.7' to path.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18994): Adding '/home/xxxx/webapps/xxxx_d15' to path.
[Sun Sep 22 17:15:23 2013] [info] mod_wsgi (pid=18994): Adding '/home/xxxx/webapps/xxxx_d15/lib/python2.7' to path.
Baffled at the moment here. Not seeing ANYTHING wrong nor any messages that help.
asked
22 Sep '13, 12:33
ccuilla
11●5●10
accept rate:
0%