Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Socorro Webapp

Running the Crash-Stats Web UI

If you have Socorro Lite installed (, this guide will show you how to install the crash reporting web UI Crash-Stats that powers

The Django application uses both PostgreSQL and ElasticSearch (and supports Filesystem or S3 for pulling up crashes directly), so make sure to run the processor with all three crash storage classes configured (and set up per the Socorro Lite install doc):

socorro processor \
    socorro.external.crashstorage_base.PolyCrashStorage' \
    socorro.external.postgresql.crashstorage.PostgreSQLCrashStorage' \

Now, clone and run the Crash-Stats Django app from the socorro-webapp repository:

  git clone
  cd socorro-webapp
  # you could instead "workon crashreports" if you want to share virtualenvs
  mkvirtualenv crashstats
  pip install -r requirements.txt
  sudo apt-get update
  sudo apt-get install node-less
  # copy default config
  cp crashstats/settings/ crashstats/settings/
  ./ syncdb --noinput
  # be sure to use an email address you control below
  ./ makesuperuser
  ./ runserver

You should now be able to log in to http://localhost:8000 as an admin using the superuser email address passed to makesuperuser.

Each product you wish to have reports on must be added via the Socorro admin UI:


All products must have one or more releases:


The new releases should be “featured” so they are used as defaults and show up in all reports:


Active Daily Install (ADI)

Most graphs and some reports in the Socorro Web UI depend on having an estimate of Active Daily Installs for each release, in order to express crashes as a ratio of crashes per install.

You should insert an ADI number (or estimate) for each day per release into the raw_adi table in PostgreSQL:

  psql breakpad
  -- args: adi_count, date, product_name, product_os_platform,
  --       product_os_version, product_version, build, product_guid,
  --       update_channel
  INSERT INTO raw_adi VALUES (15, '2014-01-01', 'TestApp', 'Linux', '2.6.18',
                             '1.0', '20140101165243',
                             '{}', 'release');

The source of this data is going to be very specific to your application, you can see how we automate this for in this job:

Generating reports for the Crash-Stats Web UI using Crontabber

Crontabber produces reports in PostgreSQL, most are updated once per day.

In order for Socorro to generate reports for the Web UI, a "crontabber" task must be run once every 5 minutes. This can be added to your crontab:

  # FIXME, won't work as-is
  # Socorro cron job manager
  */5 * * * * socorro /data/socorro/application/scripts/crons/

Production Crash-Stats Web UI

For production use, run the Crash-Stats Django app under uwsgi:

uwsgi -H ~/.virtualenvs/crashstats --wsgi-file wsgi/ -s my_socket

Then configure your webserver to pass connections to that socket.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment