By bendonnaloia
Here is my Gunicorn config, with the changes I made in bold. After saving this and doing a sudo service gunicorn restart, I received a 502 error and my website is down. I’m hoping someone can help or tell me what I’m doing wrong, I have verified that all the new relic related paths included below are correct.
description "Gunicorn daemon for Django project"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [!12345]
# If the process quits unexpectedly trigger a respawn
respawn
setuid django
setgid django
chdir /home/django
env NEW_RELIC_CONFIG_FILE=/home/django/django/dealr/newrelic.ini
exec /local/bin/newrelic-admin run-program gunicorn \
--name=django_project \
--pythonpath=django_project \
--bind=0.0.0.0:9000 \
--config /etc/gunicorn.d/gunicorn.py \
django_project.wsgi:application
I was trying to follow this thread. https://www.digitalocean.com/community/questions/how-can-i-setup-new-relic-to-work-with-the-django-single-click-install-app
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!
Does /local/bin/newrelic-admin exist? The path doesn’t sound quite right. I’m guessing you’re missing the /usr part: /usr/local/bin/newrelic-admin.
You can find out exactly what the full path is by running:
which newrelic-admin
Keep in mind that you can always check the logs to see what went wrong:
less /var/log/upstart/your-service-name.log
Press G once you’ve entered less to scroll to the bottom of the file where the most recent errors go.
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.