Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App hasn't restarted when server came back up #153

Open
DeckOfPandas opened this issue Dec 29, 2016 · 3 comments
Open

App hasn't restarted when server came back up #153

DeckOfPandas opened this issue Dec 29, 2016 · 3 comments

Comments

@DeckOfPandas
Copy link
Contributor

The retrosnub server fell over about 30d ago, but I didn't realise the app hadn't restarted until my mother told she hasn't been getting her messages.

I (well, Simon) started the app manually on the stage.takeyourmeds.co.uk server as user takeyourmeds, and the website can now be seen at stage.takeyour.meds.co.uk

The "takeyourmeds" user does not exist on live.takeyourmeds.co.uk

@lamby Could you clarify:

  • if the apps are supposed to restart themselves after the server falls over
  • Which user the live app runs as, and, if the app runs as takeyourmeds on the stage server, why the users are different
  • What I have misunderstood here
@lamby
Copy link
Contributor

lamby commented Dec 29, 2016

On mobile right now so can't investigate for few hours but in meantime can you clarify "started the app manually"? (Everything should be managed by/via systemd)

@lamby
Copy link
Contributor

lamby commented Dec 29, 2016

Back on my laptop. Not quite sure what happened here. (I see that "manual" meant starting it via a manual call to runserver!)

Which user the live app runs as, and, if the app runs as takeyourmeds on the stage server, why the users are different

Canonically, everything is managed via systemd here:

https://github.com/takeyourmeds/takeyourmeds-web/blob/master/debian/takeyourmeds.takeyourmeds-gunicorn.service#L9

(ie. www-data). There should be no difference between live and stage! (cont)

if the apps are supposed to restart themselves after the server falls over

The apps start themselves upon server restart, yes. In the process of confirming this on stage and live, this also ensured that things are being run as the systemd-specified user. Maybe there was something stale lying around...? Very odd that it worked for so long…

@lamby
Copy link
Contributor

lamby commented Dec 29, 2016

(FYI I'm using https://updown.io for monitoring; can really recommend it and it costs literally pennies)

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

No branches or pull requests

2 participants