From 95fe7a058a3de2532551da2524a6beec4a3d304c Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 15 Sep 2025 14:44:15 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20Rate=20Limiting=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EA=B2=B0=EA=B3=BC=20=EB=B0=8F=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=EC=A0=90=20=EB=AC=B8=EC=84=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 분당 20회 제한 정상 작동 확인 - 500 에러 반환 문제 발견 (429 반환해야 함) - rate_limit_handler 수정 필요 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../250915_rate_limiting_미구현.md | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/troubleshooting/250915_rate_limiting_미구현.md b/troubleshooting/250915_rate_limiting_미구현.md index bebec1f..9729e70 100644 --- a/troubleshooting/250915_rate_limiting_미구현.md +++ b/troubleshooting/250915_rate_limiting_미구현.md @@ -2,7 +2,7 @@ ## 작성일: 2025-09-15 ## 작성자: 51123 서버 관리자 -## 상태: 🟡 미해결 +## 상태: 🟠 부분 해결 --- @@ -98,4 +98,26 @@ app.add_exception_handler(RateLimitExceeded, rate_limit_handler) # 1줄 ### 배포 - Docker 재빌드: `docker compose down && docker compose up -d --build` -- 위치: `/home/admin/robeing-gateway/` \ No newline at end of file +- 위치: `/home/admin/robeing-gateway/` + +--- + +## 6. 테스트 결과 (2025-09-15 14:40) + +### 구현 상태 +- **커밋**: d8efa5a +- **배포**: Gitea Actions 자동 배포 완료 + +### 테스트 결과 +- **Rate Limiting 작동**: ✅ 분당 20회 제한 정상 작동 +- **1-20번 요청**: 200 OK +- **21번 이후**: 500 Internal Server Error + +### 발견된 문제 +- **에러 코드 문제**: Rate Limit 초과 시 500 에러 반환 +- **정상 동작**: 429 Too Many Requests 반환해야 함 +- **원인**: rate_limit_handler 예외 처리 미작동 + +### 추가 수정 필요 +- rate_limiter.py의 에러 핸들러 수정 +- 429 상태 코드 반환하도록 수정 \ No newline at end of file