English summary
Long-running gateway (or related service) processes show steady memory growth over time, eventually leading to OOM or degraded performance. Below are the test observations, reproduction steps, logs/symptoms, temporary mitigations, and requests for investigation.
Environment
- Target repository/version: openclaw (exact build/version not specified — will provide if needed)
- Runtime environment: Linux, long-running container/host
Reproduction steps (summary)
- Run gateway with default configuration for an extended period (several hours or more).
- Perform regular heartbeat/cron jobs and make external API calls as typical for the deployment.
- Observe memory usage gradually increasing; after N hours it reaches a threshold requiring GC, swap usage, or process restart.
Symptoms & observations
- RSS / memory usage does not stabilize and shows a linear/increasing trend over time.
- GC runs at a regular cadence, but memory is not released after collection.
- No explicit allocation warnings in logs, but increased latency and throttling occur.
Temporary mitigations
- Periodic process restart (systemd timer or cron) to reset accumulated memory.
- Apply container memory limits to protect the host from uncontrolled OOM.
Analysis (what I checked)
- Suspected areas: long-lived caches/global state (especially large maps/slices), accumulation of event listeners, and missing cancellation in asynchronous tasks.
- Recommended investigation: heap/alloc profiling (pprof or similar), long-term sampling of memory/GC metrics, and code review of modules that maintain global/long-lived state.
Requests
- Please triage this issue and assign an appropriate severity (high/medium suggested).
- Once an assignee is available, I will provide further logs, heap profiles, and heap dumps on request.
- Guidance on recommended temporary mitigations (e.g., restart schedule or container limits) would be appreciated.
Attachments
- I can upload reproduction scripts, memory graphs, and profiling artifacts if requested.
Additional comments
If maintainers need my detailed logs and profiling output, tell me what format and I will upload them or add them as comments.
한글 원문
요약
장기 실행 환경에서 gateway(또는 관련 서비스) 프로세스의 메모리 사용량이 시간에 따라 지속적으로 증가하여 결국 시스템 OOM 또는 성능 저하를 유발하는 문제를 발견했습니다. 아래는 제가 테스트 및 분석한 결과와 재현 절차, 로그/증상 요약, 임시 완화책 및 조사 요청사항입니다.
환경
- 대상 레포지토리/버전: openclaw (최근 빌드/버전 명시 불가 — 필요시 추가 정보 제공)
- 실행 환경: (테스트 환경) Linux, 장기 실행 컨테이너/호스트
재현 절차(요약)
- 기본 구성으로 gateway를 장시간(수시간 이상) 실행
- 정기적인 heartbeat/cron 작업 및 외부 API 호출 시 메모리 사용량이 서서히 증가
- 약 N시간 후 메모리 사용량이 임계치에 도달하여 GC/스왑/프로세스 재시작이 필요
증상 및 관찰
- RSS/메모리 사용량이 안정화되지 않고 선형/증가 추세를 보임
- GC 빈도는 일정하지만 수집 후에도 메모리가 해제되지 않음
- 관련 로그(첨부 가능): 메모리 할당 관련 경고 없음, 단 응답 지연 및 스로틀링 발생
임시 완화책
- 프로세스 주기적 재시작(예: systemd/cron)을 통해 메모리 누적을 리셋
- 메모리 상한을 설정한 컨테이너 제한으로 OOM 보호
분석(제가 확인한 내용)
- 의심 영역: 캐시/글로벌 상태(특히 장기 보관되는 맵/슬라이스), 이벤트 리스너 누적, 비동기 작업에서의 취소 누락
- 권장 조사: heap/alloc 프로파일링(pprof 또는 유사 도구), 장기 지표(메모리/가비지) 샘플링, 의심 모듈의 코드 리뷰
요청사항
- 이 이슈로 triage 부탁드립니다. (severity: high/medium 판단 가능)
- 담당자가 지정되면 추가 로그(프로파일, 힙덤프)를 제가 공유하겠습니다.
- 우선 임시완화(주기적 재시작 또는 메모리 제한) 안내를 요청합니다.
첨부
- 필요시 재현 스크립트/메모리 그래프/프로파일을 추가로 올리겠습니다.
추가 코멘트
제가 분석한 세부 로그와 프로파일링 결과가 필요하시면 알려주세요. 바로 업로드하거나 코멘트로 연결하겠습니다.
English summary
Long-running gateway (or related service) processes show steady memory growth over time, eventually leading to OOM or degraded performance. Below are the test observations, reproduction steps, logs/symptoms, temporary mitigations, and requests for investigation.
Environment
Reproduction steps (summary)
Symptoms & observations
Temporary mitigations
Analysis (what I checked)
Requests
Attachments
Additional comments
If maintainers need my detailed logs and profiling output, tell me what format and I will upload them or add them as comments.
한글 원문
요약
장기 실행 환경에서 gateway(또는 관련 서비스) 프로세스의 메모리 사용량이 시간에 따라 지속적으로 증가하여 결국 시스템 OOM 또는 성능 저하를 유발하는 문제를 발견했습니다. 아래는 제가 테스트 및 분석한 결과와 재현 절차, 로그/증상 요약, 임시 완화책 및 조사 요청사항입니다.
환경
재현 절차(요약)
증상 및 관찰
임시 완화책
분석(제가 확인한 내용)
요청사항
첨부
추가 코멘트
제가 분석한 세부 로그와 프로파일링 결과가 필요하시면 알려주세요. 바로 업로드하거나 코멘트로 연결하겠습니다.