Skip to content

fix: cron 텔레그램 전송 재시도 + 죽은 소켓 방지#9

Open
JessicaArchive wants to merge 1 commit intomainfrom
fix/cron-telegram-retry
Open

fix: cron 텔레그램 전송 재시도 + 죽은 소켓 방지#9
JessicaArchive wants to merge 1 commit intomainfrom
fix/cron-telegram-retry

Conversation

@JessicaArchive
Copy link
Owner

Summary

  • 크론잡 텔레그램 전송 실패 시 3회 재시도 + 지수 백오프 추가
  • keepAlive 에이전트의 maxFreeSockets를 2로 제한해 6시간 후 죽은 소켓 재사용 방지

원인

6시간 간격 크론잡에서 텔레그램 API keepAlive 소켓이 유휴 상태로 죽은 뒤, 재사용 시도 시 소켓 RST로 빈 reason 에러 발생

변경 파일

  • src/scheduler/cron.ts: retrySend() 헬퍼 추가, 전송 3곳에 적용
  • src/channels/telegram.ts: Agent에 maxFreeSockets: 2 추가

Test plan

  • 봇 재시작 후 크론잡 정상 전송 확인
  • 6시간 대기 후 다음 크론 전송 성공 확인

🤖 Generated with Claude Code

Cron jobs were generating content successfully but telegram delivery
failed due to stale keepAlive sockets after long idle periods (6h).

- Add retrySend() with 3 attempts + exponential backoff in cron.ts
- Limit maxFreeSockets to 2 in telegram.ts Agent to reduce stale connections

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant