This worked for me except the arguments passed has to be changed to this: 

newrelic.agent.initialize(os.path.join(os.path.dirname(__file__), 
"newrelic.ini"))

On Monday, July 29, 2013 2:06:54 PM UTC+5:30, Graham Dumpleton wrote:
>
> What is the error in the Apache error logs?
>
> At a guess it is because you aren't supplying an absolute path to the 
> location of the newrelic.ini file.
>
> The working directory of Apache isn't going to be the directory where your 
> code is.
>
> So use something like:
>
> import os
> import newrelic.agent
> newrelic.agent.initialize(os.path.dirname(__file__), 'newrelic.ini'))
>
> Presuming newrelic.ini is in the same directory as the wsgi.py file.
>
> Graham
>
> On 29/07/2013, at 6:30 PM, virgil.balibanu 
> <[email protected]<javascript:>> 
> wrote:
>
> Hi,
>
> I'm trying to install new relic on my demo server. It runs python+django 
> on mod_wsgi on centos. In my djnago.wsgi file I try to do this:
>
> import newrelic.agent
> newrelic.agent.initialize('newrelic.ini')
>
> import os
> import sys
>
> sys.path.append('/home/projects')
> sys.path.append('/home/projects/sbo')
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'sbo.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> But it keep failing. Internal server error. It fails even if a leave only 
> the import. But newrelic is installed and in python2.7 which I use I can 
> use the import.
>
> Any ideea why it might fail?
>
> Thanks,
> Virgil Balibanu
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to