uWsgi+nginx+Django, can't get python back traces ?

Discussion in 'Programming' started by Elixer, Nov 1, 2012.

  1. Elixer

    Elixer Diamond Member

    Joined:
    May 7, 2002
    Messages:
    9,039
    Likes Received:
    272
    Site admin changed to using uWsgi to run the Django site (was fastCGI before), and now, we aren't getting any python errors back traces at all in any logs.

    Anyone have any idea how to debug a issue like this?
    Already have checked nginx's logs, uWsgi's logs (using --logto), and the django application itself logs, and none of them have any python related content in them.
    I can see via nginx that we are getting 500 errors, so, obviously, python is crashing someplace...

    from the project's settings...
    Code:
    LOGGING = {
        'version': 1,
        'disable_existing_loggers': True,
        'formatters': {
            'verbose': {
                'format': '[%(asctime)s] %(levelname)s %(pathname)s:%(lineno)s %(message)s'
            }
        },
        'handlers': {
            'null': {
                'level':'DEBUG',
                'class':'django.utils.log.NullHandler',
                },
            'mail_admins': {
                'level': 'ERROR',
                'class': 'django.utils.log.AdminEmailHandler',
                },
            'console':{
                'level':'DEBUG',
                'class':'logging.StreamHandler',
                'formatter': 'verbose',
                }
        },
        'loggers': {
            'django.db.backends': {
                'handlers': ['null'],
                'propagate': False,
                },
            'django.request': {
                'handlers': ['console', 'mail_admins'],
                'level': 'ERROR',
                'propagate': True,
                },
            'django': {
                'handlers': ['null'],
                'level': 'DEBUG',
                'propagate': True,
                },
            '': {
                'handlers': ['console'],
                'level': 'DEBUG',
                'propagate': True,
                },
            }
    }
     
  2. Loading...

    Similar Threads - uWsgi+nginx+Django python back Forum Date
    basic python 2.7 print method question Programming May 8, 2017
    Should I look into learning Python? Programming Apr 24, 2017
    Python syntax compile error Programming Mar 30, 2017
    python/recreating checksum value Programming Feb 27, 2017

  3. DannyBoy

    DannyBoy Diamond Member

    Joined:
    Nov 27, 2002
    Messages:
    8,816
    Likes Received:
    0
    Check and double check your nginx routes
     
  4. Elixer

    Elixer Diamond Member

    Joined:
    May 7, 2002
    Messages:
    9,039
    Likes Received:
    272
    Yeah, already did.
    Didn't find a answer for this issue.

    However, I installed raven, and using Sentry, and that is pure awesome!
    https://www.getsentry.com/welcome/ For those that haven't seen what this does...
     
  5. tothapiclo

    tothapiclo Junior Member

    Joined:
    Dec 27, 2016
    Messages:
    1
    Likes Received:
    0
    I had the same issue. I recheck everything following this nginx+django tutorial and I found that I was missing something in my /etc/nginx/sites-available/site.conf file!
    my two cents.