refinery-platform
refinery-platform copied to clipboard
On AWS, supervisor does not run on reboot
-
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:
- Reboot instance.
- 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.
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
)
But the real problem is that supervisord isn't being run on reboot. Should have an init script, right?
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/