Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Container Auto Restart

Featured Replies

Hi,

 

Not sure if this has been raised before or if other people have just found ways around it, but could we have some method to selectively (per specific container), have an auto-restart if certain conditions are met?

Such as:

  • RAM usage above a set limit
  • Specific "health-check" port not responding
  • On a cron schedule?

 

I've also noticed some containers fail to start at all sometimes, or a stuck on a startup loop.

In cases like this would there be room to forcibly stop a container and send a notification out if a container is looping or has been forcibly shutdown as a result?

 

My reason for asking is that occasionally I've had to restart Plex Media Server as it's hogging 4-5GB of RAM while idling, and today SABnzbd-VPN was totally unresponsive on the local port and when checking the log noticed it was continually not seeing DNS for PrivateInternetAccess and looping - a forced stop and start resolved it immediately.

 

What's everyone else's experience here? Worth a feature add?

I do restart and backup all docker containers every night with User Scripts. So there's a User Script for each and every docker.

 

I had to move the start of the User Scripts to a different time in the night but that was easy enough (crontab -e).

 

docker stop <containername>

# Backup tasks depending on specific docker containers
# e.g. rsync user content to backup machine
# e.g. cp settings to backup machine (e.g. Plex watch state and settings)
# e.g. dump or export database contents (e.g. MariaDB, SQLite, ...)
# e.g. ...

docker start <containername>

After these scripts are being started every night I no longer experienced any problems.

 

Specific conditions would be cool, but if you start to collect conditions it will become a can of worms IMHO.

 

RAM usage

Port not responding

+ Plex activity from remote users (won't restart and backup Plex if there is streaming activity)

+ Running parity check on remote backup server (won't backup if a parity check is running)

...

 

You get the idea. The possible conditions are nearly endless.

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.