3

I'm currently trying to install graphite 0.9.9 on a gentoo box using these instructions from the graphite wiki. Essentially, it fronts graphite using apache and mod_wsgi.

Everything seems to have gone well, except that apache / the graphite webapp never seem to return a response to the web browser (the browser continuously waits to load the page). I've turned on the graphite debug info, but the only message in the log files is this, repeated over and over again in info.log (with the pid always changing):

Thu Feb 23 01:59:38 2012 :: graphite.wsgi - pid 4810 - reloading search index

These instructions have worked for me before to set up graphite on an Ubuntu machine. I suspect that mod_wsgi is dying, but I have confirmed that mod_wsgi works fine when not serving the graphite webapp.

This is what my graphite.conf vhost file looks like:

WSGISocketPrefix /etc/httpd/wsgi/ 

<VirtualHost *:80>
    ServerName # Server name
    DocumentRoot "/opt/graphite/webapp"
    ErrorLog /opt/graphite/storage/log/webapp/error.log
    CustomLog /opt/graphite/storage/log/webapp/access.log common

    # I've found that an equal number of processes & threads tends
    # to show the best performance for Graphite (ymmv).
    WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
    WSGIProcessGroup graphite
    WSGIApplicationGroup %{GLOBAL}
    WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}

    WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi  

    Alias /content/ /opt/graphite/webapp/content/ 
    <Location "/content/"> 
            SetHandler None 
    </Location> 

    # XXX In order for the django admin site media to work you 
    # must change @DJANGO_ROOT@ to be the path to your django 
    # installation, which is probably something like: 
    # /usr/lib/python2.6/site-packages/django 
    Alias /media/ "/usr/lib64/python2.6/site-packages/django/contrib/admin/media/" 
    <Location "/media/"> 
            SetHandler None 
    </Location> 

    # The graphite.wsgi file has to be accessible by apache. It won't 
    # be visible to clients because of the DocumentRoot though. 
    <Directory /opt/graphite/conf/> 
            Order deny,allow 
            Allow from all 
    </Directory> 

</VirtualHost> 
River
  • 143
  • 5

1 Answers1

0

Doesn't address your problem, but you don't need:

<Location "/content/"> 
        SetHandler None 
</Location> 

<Location "/media/"> 
        SetHandler None 
</Location> 

Using SetHandler like that was only need in the past when using mod_python. It is not required when using mod_wsgi.

What I would suggest you do is make sure the user your code runs as under Apache actually has appropriate write access to any directories it needs for data files for the application.

Graham Dumpleton
  • 5,990
  • 2
  • 20
  • 19
  • Thanks. I've double checked that all the data files belong to the appropriate user:group, and that the read write permissions are set. This doesn't seem to have been the problem, though :( – River Feb 23 '12 at 13:47