Maintenance mode

Is there a ‘right’ way to do system maintenance on a running system?

Services to stop (is there a correct order?)

  • webserver (lighttpd/apache)
  • mysql (mariadb)
  • php
  • redis
  • mqtt_input
  • service-runner
  • feedwriter (if installed)

Anything missed?

Hello @borpin

I usually stop services in the following order on an emonpi/emonbase:

  1. emonhub & apache (stops incoming data at the source)
  2. mqtt_input (receives data usually from emonhub)
  3. feedwriter (receives data from mqtt_input)

Redis should not need stopping. But you can run a redis background save and then stop redis at this point if you want to be really safe before a reboot (e.g on

mysql and php should not need stopping.

You can stop and restart emonhub, mqtt_input and feedwriter independently at any time. They talk together via MQTT and Redis.

mqtt_input handles reconnection if the mqtt broker goes down and exits if redis goes down. It then restarts automatically when redis-server is back up again. feedwriter does not seem to be restarting here, will look into that.

1 Like