By iknwosu3
Hello fellow humans.
I finally deployed my app after following the tutorial how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 but when i try to upload a file on the site as a user, i get server error (500). Wht do I have to do to remedy the problem as soon as possible??
will appreciate your assistance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @iknwosu3
Can you show the log both Gunicorn and Nginx?
tail -20 /var/log/nginx/error.log
tail -20 /path/to/gunicorn.log
Change it do this:
ExecStart=/home/kingiyk/stylplus/env/bin/gunicorn --error-logfile /var/log/gunicorn.log --access-logfile - --workers 3 --bind unix:/home/kingiyk/stylplus/stylplus.sock stylplus.wsgi:application
Restart Gunicorn sudo service gunicorn restart
Try to upload, so you get the error and then check /var/log/gunicorn.log
Okay, change current log level to debug, by adding this parameter:
--log-level debug
http://docs.gunicorn.org/en/stable/settings.html#loglevel
There’s something wrong with your upload-code or maybe you try save the uploaded file to a place where there’s no permissions, which somehow is crashing Gunicorn.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.