DOCS/troubleshooting/250921_happybell80_healthcheck_frequency_issue.md
happybell80 4ef365d37a Update log analysis doc - mark auth-server issue as resolved
- auth-server 불필요한 로그 문제 해결됨 표시
- 상태를 '부분 해결'로 업데이트
2025-09-22 00:44:07 +09:00

1.5 KiB

헬스체크 로그 오염 문제

작성일: 2025-09-21 작성자: happybell80 상태: 완료

문제

httpx 라이브러리가 헬스체크 요청마다 INFO 레벨로 로그를 생성:

{"time":"2025-09-21 23:24:33","level":"INFO","module":"httpx","msg":"HTTP Request: GET http://localhost:8501/health "HTTP/1.1 200 OK""}
  • 30초마다 실행 = 하루 8,640개 로그
  • 다른 중요한 로그가 묻힘

해결책

1. Docker Compose 수정 (완료)

  • rb8001/docker-compose.yml:79
  • auth-server/docker-compose.yml:47
interval: 300s  # 30s → 300s

2. HealthCheckFilter 적용 (필요)

  • 위치: rb8001/app/core/logger.py:39 (setup_logging 함수 끝)
  • 추가할 내용: HealthCheckFilter 클래스 정의 및 httpx 로거에 필터 추가
  • 효과: /health 경로 로그만 제거, 다른 API 호출 로그는 유지

3. 이미 완료된 수정

  • rb8001/main.py:406 - logger.debug() 적용됨
  • skill-email/main.py:414 - logger.debug() 적용됨
  • skill-news/main.py:59 - logger.debug() 적용됨

영향 범위

  • rb8001 로그 파일
  • Docker 컨테이너 로그 (json-file 드라이버)
  • /mnt/51123logs 백업 로그

관련 문서

  • 250908_rb8001_logging_issues.md - 로깅 시스템 구현
  • 250817_robeing_monitor_integration.md - robeing-monitor 통합

다음 단계

  1. rb8001 코드에서 헬스체크 스케줄러 찾기
  2. 간격 설정을 환경변수로 외부화
  3. robeing-monitor health 엔드포인트 구현 또는 제거
  4. 로그 레벨 정책 수립