Smart Service Auto-Restart: Self-Healing Servers, Done Safely

When a critical service dies at 3 a.m. — nginx, MySQL, Redis, php-fpm — every minute it stays down is lost traffic or revenue. Monitorix can restart it for you automatically. But "automatically" is dangerous if it's naive, so Monitorix restarts services carefully, only on sustained conditions, and only for the services you choose.

Neon illustration of live service monitoring and automatic recovery
Monitorix watches your services and can recover them automatically — safely.

What is smart service auto-restart?

The Monitorix agent discovers the services running on your server and lets you enable automatic restart on a per-service basis. When an enabled service meets a failure condition for long enough, Monitorix tells the agent to restart it and records the action. Everything about it is opt-in and configurable.

Why "sustained conditions" matter

Restarting a service on a single failed check is how you turn a blip into an outage — or an outage into a restart loop. Monitorix only acts when a problem persists:

  • Down for X minutes — the service has been dead continuously for the duration you set, not just one missed check.
  • High CPU for X minutes — the service has been above a CPU threshold you define, continuously, for the duration you set.

Both the threshold (Y%) and the duration (X minutes) are configured per service, right from the server's management page in Monitorix.

How does it avoid restart loops?

A cooldown sits between restarts of the same service, so a service that keeps failing won't be restarted every minute forever. Instead you get a clear signal that something needs human attention — which is exactly when you'd want to stop automating and start investigating.

Which services should I enable it for?

Enable auto-restart for stateless, safe-to-restart services where a quick bounce genuinely fixes a transient hang — web servers, PHP-FPM, caches. Be more cautious with databases and anything that needs a clean shutdown. By default, auto-restart is off for everything; you turn it on only where it makes sense.

Is it safe?

Yes — it's fully under your control. Discovery is read-only, restart is off by default, and the agent only ever restarts a service you explicitly enabled, under conditions you set. To set it up, install the Monitorix agent and open your server's management page.

Frequently Asked Questions

What is smart service auto-restart?
A feature where Monitorix restarts a failed or stuck service automatically, but only on sustained conditions you configure per service.
Will Monitorix restart a service on a single failed check?
No. It only restarts after a service has been down, or above a CPU threshold, continuously for the duration you set, and a cooldown prevents restart loops.
Which services should I enable auto-restart for?
Stateless, safe-to-restart services such as web servers, PHP-FPM and caches. Be more cautious with databases and anything needing a clean shutdown.
Is auto-restart enabled by default?
No. It is off for every service until you explicitly enable it from the server management page.