Purpose: monitor t5memory for crashes and non crashing hangs to fast restart the service.
In order to use the watchdog scripts:
exchange the entrypoint in your docker compose file - replace in the t5memory section the entrypoint:
entrypoint:
- /root/t5memory
+ /root/start-with-watchdog.sh
then the script is used for startup with watchdogs enabled. If t5memory does not start your current version of the image does not start up. Please change back to old entrypoint.
Additional optional environment variables can be provided to the watchdog scripts:
environment: - WATCHDOG_MAX_MEM=25G - WATCHDOG_MAX_FAILS=3 - WATCHDOG_TIMEOUT=3 - WATCHDOG_SLEEP=10 - WATCHDOG_HTTP_ENABLED=true |
Variable | Default | Purpose |
---|---|---|
WATCHDOG_MAX_MEM | 25G | The max memory t5memory may consume, if its oversized its getting restarted gracefully, saves all data in RAM to the disk and runs afterwards again with lesser RAM usage |
WATCHDOG_HTTP_ENABLED | false | Set to true, to enable a regularly HTTP check on the running service. If disabled still one HTTP call to the service is done after a SIGABRT (abnormal abort) was produced by t5memory, regardless of this setting. |
WATCHDOG_MAX_FAILS | 3 | When t5memory is running, but does not react to the here configured amount of times, then we consider it as hanging and kill it hard |
WATCHDOG_TIMEOUT | 3 | The timeout of the HTTP watchdog calls |
WATCHDOG_SLEEP | 10 | seconds between the HTTP watchdog calls |