워커 재시작
증상
- 특정 에이전트(ron, codex, cowork, guardian, data-analyst)가 작업을 처리하지 않음
launchctl list 에서 워커 서비스 상태가 비정상 (exit code != 0)
- ops_multiagent.db 에 해당 워커의 heartbeat가 오래된 상태
- 텔레그램/슬랙에서 특정 에이전트 응답 없음
원인
- 워커 프로세스 크래시 — 미처리 예외, 메모리 초과
- DB 락 — ops_multiagent.db 동시 접근으로 인한 SQLITE_BUSY
- 설정 변경 미반영 — jobs.json 또는 환경변수 변경 후 재시작 누락
- launchd 서비스 등록 해제 — 비정상 종료 반복으로 서비스 비활성화
해결 단계
1. 워커 서비스 상태 확인
# 전체 워커 상태 조회
for w in ron codex cowork guardian data-analyst; do
echo "=== com.openclaw.worker-${w} ==="
launchctl list | rg "com.openclaw.worker-${w}" || echo "NOT FOUND"
done
2. 특정 워커 재시작
# 예: ron 워커 재시작
launchctl stop com.openclaw.worker-ron
launchctl start com.openclaw.worker-ron
3. 전체 워커 일괄 재시작
for w in ron codex cowork guardian data-analyst; do
echo "Restarting com.openclaw.worker-${w}..."
launchctl stop "com.openclaw.worker-${w}" 2>/dev/null
launchctl start "com.openclaw.worker-${w}" 2>/dev/null
echo " done"
done
4. 서비스가 등록 해제된 경우
# 서비스 상태 진단
launchctl print gui/$(id -u)/com.openclaw.worker-ron
# 서비스 재등록이 필요하면 openclaw doctor 실행
openclaw doctor
5. DB 락 문제 해결
# DB 락 상태 확인
sqlite3 ~/.openclaw/data/ops_multiagent.db "PRAGMA journal_mode;"
sqlite3 ~/.openclaw/data/ops_multiagent.db "PRAGMA busy_timeout;"
# WAL 체크포인트 강제 실행
sqlite3 ~/.openclaw/data/ops_multiagent.db "PRAGMA wal_checkpoint(TRUNCATE);"
확인 방법
# 워커 프로세스 실행 확인
for w in ron codex cowork guardian data-analyst; do
status=$(launchctl list | rg "com.openclaw.worker-${w}" | awk '{print $1}')
echo "worker-${w}: PID=${status:-N/A}"
done
# heartbeat 확인 (최근 5분 이내인지)
sqlite3 ~/.openclaw/data/ops_multiagent.db \
"SELECT agent_id, last_heartbeat FROM agents WHERE last_heartbeat > datetime('now', '-5 minutes');"
# 헬스체크
python3 ~/.openclaw/workspace/scripts/health_check.py