#django

/

      • streblo has quit
      • toothe has left the channel
      • Contigi joined the channel
      • KaffeeJunky123
        Klamity: is that paste of yours your whole server setup?
      • Klamity
        I've also got nginx, but thats configured fine
      • lieber joined the channel
      • rtpg joined the channel
      • nimomo has quit
      • ubuntu_aze joined the channel
      • KaffeeJunky123
        Klamity: does the nginx user have read/write access to the unix socket?
      • *gunicorns unix socket
      • Klamity
        I would assume so because KaffeeJunky123, when i go to example.com/admin it works fine
      • It's just my main page thats 500'ing
      • KaffeeJunky123: would that mean it has access?
      • KaffeeJunky123
        is /admin running on gunicorn?
      • if so that would mean that the nginx process has access to the gunicorn socket
      • km2 joined the channel
      • can you paste your nginx config?
      • Klamity
        Sure, give me just a second
      • and admin would have to be, right?
      • bc its part of my project
      • ARJMP joined the channel
      • Had to redact a lot sorry
      • jsaq007 joined the channel
      • km2 has quit
      • giarc joined the channel
      • graingert has quit
      • ubuntu_aze has quit
      • keimlink has quit
      • grumpi has quit
      • KaffeeJunky123: What do you think?
      • km2 joined the channel
      • KaffeeJunky123
        Klamity: well, hard to tell, but checkout http://wiki.nginx.org/Pitfalls#Check_IF_File_Ex...
      • I'm not that good with nginx configuration, but maybe that if statement is the problem
      • Klamity
        It's what's reccomended by the makers of gunicorn
      • so idk
      • ty btw
      • it_dude joined the channel
      • km2 joined the channel
      • pydave6367 has quit
      • Hairy has quit
      • km2 joined the channel
      • ybathia has quit
      • Y3K joined the channel
      • Y3K
        \o
      • mkoistin_ joined the channel
      • mkoistin_ has quit
      • it_dude has quit
      • mkoistin_ joined the channel
      • mkoistinen has quit
      • YuanModu has quit
      • ryanisnan joined the channel
      • areski joined the channel
      • km2 joined the channel
      • ryanisnan
        Has anyone used django-redis before? I'm having no luck with the connection pool functionality and was curious if others have had luck here.
      • cewing has quit
      • rtpg has quit
      • pydave6367 joined the channel
      • mehola joined the channel
      • jessamynsmith
        hm, I used redis in a python app before, but not django
      • ryanisnan
        It's working fine jessamynsmith, it's just returning 0 for the # of connections created in the connection pool :P
      • jessamynsmith
        hm :/
      • FunkyBob
        ryanisnan: I've used it, don't recall using connection pooling
      • dvl` joined the channel
      • pantsofchocolate has quit
      • yatzooa_ has quit
      • lordkryss has quit
      • ryanisnan has quit
      • hippojazz joined the channel
      • shannonlucas joined the channel
      • Klamity
        Django isn't sending me emails on a 500 email
      • Is there a common cause?
      • mihow has quit
      • picasso has quit
      • decaff joined the channel
      • decaff
        what do you mean exactly?
      • Klamity
        Do I write that in my settings.py?
      • Where is logging configured
      • decaff
        ahh, yeah that goes in settings.py
      • Klamity
        Thanks!
      • Once this is configed, will django send me emails on 500?
      • decaff
        if you are using an email handler that is properly configured, it should
      • just so you know, you don't have to do it this way, I personally don't use this syntax to set up loggers because I don't particularly like it and I just set up the loggers the normal way in settings.py
      • Klamity
        What is the normal way
      • My email is setup fine
      • I just need to get the stack trace, and see what is causing my site to 500
      • decaff
        you can set up the stack trace to go to a log file which would probably be easier than emailing it
      • Klamity
        That would be great, how do I do that?
      • decaff
        the "normal" way is just importing logging and setting up handlers etc.
      • Klamity
        Is that a lot of work? I mean is there no shortcut to just get the stack trace
      • decaff
        you can set up a logger, attach a handler, specify a format string, get the logger in your views file
      • CashewGuy joined the channel
      • well if you have DEBUG=True it should show you a stack trace in the browser
      • Klamity
        Production :\
      • decaff
        depending on how your server is set up, there should be a standard error file for the web server
      • Klamity
        Not seeing any django errors there
      • Audioburn has quit
      • MarkusH
        Klamity: what stack do you use? mod_wsgi, gunicorn, uwsgi?
      • jeffasinger joined the channel
      • Klamity
        gunicorn
      • decaff
        nginx/gunicorn
      • MarkusH
        enabled logging on their level?
      • Klamity
        Yeah
      • Not seeing anything there
      • MarkusH
        --access-logfile - --error-logfile -
      • or instead of the single - a path to a log file
      • decaff
        I can't think if i've ever had a reason to look at the gunicorn logs if there are any
      • MarkusH
        decaff: gunicorn needs to actually output the logs django sends
      • decaff
        I have my views split up into several modules in a package and there is a separate logger for each module which gets written to a json file
      • Klamity
        I found something in nginx log just now
      • decaff
        MarkusH do you mean if you are writing logs over HTTP or RPC or something? I'm just writing to files
      • Klamity
        It's content not being found
      • css
      • Would that cause this?
      • MarkusH
        Klamity: Please provide code and __full__ traceback in a pastebin
      • decaff
        Is django serving your static files or is nginx, or are you using a cdn
      • Klamity
        I would if I could MarkusH
      • I don't have the traceback
      • KaffeeJunky123 has quit
      • MarkusH
        what does "It's content not being found" mean?
      • Klamity
        decaff: nginx should be serving static
      • MarkusH: It means ..static/static/bootstrap/css/stylish-portfolio.css" failed (2: No such file or directory)..
      • In nginx log
      • MarkusH
        of course not
      • decaff
        and have you checked if the css it's trying to serve actually exists?
      • MarkusH
        why do you have .. in there?
      • jeffasinger has quit
      • decaff
        the problem also may be that nginx does not have permissions to read from that directory
      • Klamity
        decaff: That mighe be it
      • decaff
        you can check the owner and group with ls -al
      • MarkusH
        Klamity: lets see your nginx config, gunicorn command,settings file,
      • and template where you include the CSS file
      • decaff
        then you need to see what user nginx is running as, and you can work from there
      • MarkusH
        Pastebin at: http://dpaste.de/
      • if you use supervisord, that as well, please
      • jeffasinger joined the channel
      • decaff
        I had so much trouble getting supervisord up and running
      • MarkusH
        install, add config, restart, done
      • Klamity
        nginx is running as www-data, that dir owned by webapps
      • Quitta joined the channel
      • OtherAllan has quit
      • MarkusH
        Klamity: what about all the other dirs above?
      • Quitta has quit
      • Klamity
        That may be an old error, I'm not even sure
      • Ok posting config in just a moment
      • icasdri has quit
      • What configs do you need?
      • cssko has quit