Install
openclaw skills install openclaw-session-cleanupDiagnose and stabilize long-running OpenClaw deployments that accumulate stale sessions, unreaped agents, browser-control timeouts, gateway websocket 1006 cl...
openclaw skills install openclaw-session-cleanupUse this skill when the runtime becomes unstable after long uptime, especially on small hosts such as 1 vCPU / 2 GB RAM.
Treat these as the main signals:
Sessions: 10+ activeAgents: 5+browser control service timeoutgateway 1006 abnormal closureRun:
openclaw sessions
openclaw sessions prune
openclaw status
If the runtime is still unhealthy, escalate to:
openclaw sessions clear
openclaw status
Healthy target after cleanup:
Sessions: 1-3Agents: 3Gateway reachablebrowser runningFor 1 vCPU / 2 GB RAM, prefer:
maxSessions = 5sessionTTL = 30mmaxAgents = 3maxBrowsers = 1swap = 2GUse the starter config at {baseDir}/templates/openclaw.json.
Install periodic pruning:
bash "{baseDir}/scripts/install-cron-prune.sh"
Install watchdog unit files:
bash "{baseDir}/scripts/install-watchdog.sh"
Render a tuned runtime config:
bash "{baseDir}/scripts/render-openclaw-config.sh"
Treat browser control as the heaviest resource consumer on a small VPS.
Recommended mode:
openclaw browser start --single
If the host has no swap, add 2G:
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
free -h
{baseDir}/docs/openclaw.session_cleanup_v1.md{baseDir}/templates/openclaw.json{baseDir}/templates/openclaw-watchdog.service{baseDir}/templates/openclaw-watchdog.timer