python - Can't get Newrelic with gunicorn supervisor django 1.6 to work -


im trying newrelic python agent work setup supervisor , gunicorn, can't work.

here current supervisor setup works:

[program:gunicorn] directory = /home/<user>/.virtualenvs/<domain>/myproject/ command=/home/<user>/.virtualenvs/<domain>/bin/gunicorn my_project.wsgi:application 

i tried this:

[program:gunicorn] directory = /home/<user>/.virtualenvs/<domain>/myproject/  #working command #command=/home/<user>/.virtualenvs/<domain>/bin/gunicorn myproject.wsgi:application   command=/home/<user>/.virtualenvs/<domain>/bin/newrelic-admin run-program /home/<user>/.virtualenvs/<domain>/bin/gunicorn myproject.wsgi:application environment=new_relic_config_file=/home/<user>/.virtualenvs/<domain>/myproject/newrelic.ini  user = <user> autostart = true autorestart = true stderr_events_enabled = true redirect_stderr = true stdout_logfile = /home/<user>/logs/gunicorn.log stderr_logfile = /home/<user>/logs/gunicorn_err.log 

but error:

traceback (most recent call last):   file "/home/user/.virtualenvs/domain.com/lib/python2.7/site.py", line 688, in <module>     main()   file "/home/user/.virtualenvs/domain.com/lib/python2.7/site.py", line 679, in main     execsitecustomize()   file "/home/user/.virtualenvs/domain.com/lib/python2.7/site.py", line 547, in execsitecustomize     import sitecustomize   file "/home/user/.virtualenvs/domain.com/local/lib/python2.7/site-packages/newrelic-1.10.2.38-py2.7-linux-x86_64.egg/newrelic/bootstrap/sitecustomize.py", line 74, in <module>     newrelic.agent.initialize(config_file, environment)   file "/home/user/.virtualenvs/domain.com/local/lib/python2.7/site-packages/newrelic-1.10.2.38-py2.7-linux-x86_64.egg/newrelic/config.py", line 1456, in initialize     log_file, log_level)   file "/home/user/.virtualenvs/domain.com/local/lib/python2.7/site-packages/newrelic-1.10.2.38-py2.7-linux-x86_64.egg/newrelic/config.py", line 383, in _load_configuration     'unable open configuration file %s.' % config_file) newrelic.api.exceptions.configurationerror: unable open configuration file /. 

the newrelic.ini file on path, doing wrong?

edit:

path newrelic.ini file is:

/home/<user>/.virtualenvs/<domain>/myproject/newrelic.ini 

environment needs quotes work.

here working setup:

[program:gunicorn] directory = /home/<user>/.virtualenvs/<domain>/<project>/ command=/home/<user>/.virtualenvs/<domain>/bin/newrelic-admin run-program /home/<user>/.virtualenvs/<domain>/bin/gunicorn <project>.wsgi:application environment=new_relic_config_file="/home/<user>/.virtualenvs/<domain>/<project>/newrelic.ini"  user = <user> autostart = true autorestart = true stderr_events_enabled = true redirect_stderr = true stdout_logfile = /home/<user>/logs/gunicorn.log stderr_logfile = /home/<user>/logs/gunicorn_err.log 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -