I'm running Django project using nginx and uwsgi-0.9.6.8, and it works fine!
If I upgrade
to a newer version of uwsgi, however, I'm receiving a 502 over HTTP and in
my
logs I see a one line Python exception:

    TypeError: 'str' object is not callable

I have no idea where this exception occurs. So my question is simply how I
can
debug this to find the cause of the error. Since the exception only occurs
when
I run my Django project under a newer version of uwsgi I can't debug this
using
the django runserver. Should I compile wsgi with debug flags and run the
server
with gdb?

I suspect the error to have something to do with my wsgi.py file so I'll
post my
configuration along with this email just in case I'm doing something
obviously
wrong.

# django_wsgi.py

    import os
    import sys
    import site

    import django.core.handlers.wsgi
    from django.conf import settings

    os.environ['DJANGO_SETTINGS_MODULE'] = '<project>.settings'

    PROJECT_PATH = getattr(settings, 'PROJECT_PATH')

    sys.path.append(PROJECT_PATH)
    site.addsitedir(os.path.join(PROJECT_PATH,
'/ve/lib/python2.6/site-packages'))

    application = django.core.handlers.wsgi.WSGIHandler()
    applications = {'':'application', }

# uwsgi.conf

    [uwsgi]
    chmod-socket=666
    daemonize=/var/log/uwsgi_project_srv.log
    harakiri=75
    home=/home/user/path/project/ve
    master=true
    memory-report=true
    module=<project>.django_wsgi
    no-orphans=true
    processes=4
    pythonpath=/home/user/path/
    socket-timeout=75
    socket=/tmp/<project>.sock

# nginx.conf

    ...

    location / {
        uwsgi_pass unix:///tmp/uwsgi_project_srv.sock;
        include uwsgi_params;
    }

    ...


Thanks,
Simon.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to