WebChatDocsWatchdog

Watchdog

Source: docs/watchdog.md · DEV

Use the watchdog when local development servers should recover automatically if they go down.

Start

./start_watchdog.sh

Default checks run every 5 seconds and watch:

  • relay: http://127.0.0.1:5110/health
  • web: http://127.0.0.1:8027/app/webchat/chat.html
  • site: http://127.0.0.1:8091/pchat.html

If a health check fails, the watchdog restarts that service.

Change Interval

WEBCHAT_WATCH_INTERVAL=10 ./start_watchdog.sh

Recommended interval is 5 to 10 seconds.

Watch Only Private Relay

WEBCHAT_WATCH_SERVICES=relay ./start_watchdog.sh

Watch App And Relay

WEBCHAT_WATCH_SERVICES=relay,web ./start_watchdog.sh

Ports

WEBCHAT_WATCH_RELAY_PORT=5110 \
WEBCHAT_WATCH_WEB_PORT=8027 \
WEBCHAT_WATCH_SITE_PORT=8091 \
./start_watchdog.sh

The watchdog uses strict ports so the browser links stay stable.

Logs

Service logs are written under:

relay/logs/watchdog/