takeyourmeds / takeyourmeds-web

Low-tech medication reminder application that can call or text a user with a custom message on any desired schedule.
MIT License
10 stars 5 forks source link

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

Open DeckOfPandas opened 7 years ago

DeckOfPandas commented 7 years ago

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:

lamby commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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