refinery-platform icon indicating copy to clipboard operation
refinery-platform copied to clipboard

On AWS, supervisor does not run on reboot

Open drj11 opened this issue 7 years ago • 3 comments

  • Specific code commit: f674efe1702853011c89631190a590dce65f4524 (but lots, really)

  • Version of the web browser and OS:

irrelevant

  • Environment where the error occurred (Vagrant VM and site conf mode or AWS instance):

beta.genometranslationcommons.org (but universal)

Steps to reproduce

Please list all the actions and the input data used:

  1. Reboot instance.
  2. Try and upload something.

Observed behavior

The upload fails, but takes a long time to do so (eg, 45 minutes!)

Expected behavior

Upload should work reasonably promptly.

drj11 avatar Aug 18 '17 10:08 drj11

The underlying problem is that supervisord isn't running.

SSH'd into an instance, you can check this with

ps waxwux | grep supervisor (it should show a python process running supervisord)

You can restart supervisord with:

(
cd /srv/refinery-platform/refinery
DJANGO_SETTINGS_MODULE=config.settings.aws ~/.virtualenvs/refinery-platform/bin/supervisord
)

drj11 avatar Aug 18 '17 10:08 drj11

But the real problem is that supervisord isn't being run on reboot. Should have an init script, right?

drj11 avatar Aug 18 '17 10:08 drj11

Another option is to use something like Monit: https://hiddentao.com/archives/2012/01/27/processing-long-running-django-tasks-using-celery-rabbitmq-supervisord-monit/

hackdna avatar Apr 09 '19 23:04 hackdna