C.W.K.
Stream
Lesson 06 of 14 · published

Timeout

~8 min · timeout, hangs, reliability

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

기본 6 시간 job timeout 은 거의 모든 거에 잘못

명시적 timeout 없으면 job 이 최대 6 시간 돔. Hang process — flaky 외부 service 기다리는 test, registry outage 에 막힌 docker pull — 가 반나절 동안 CI 예산을 조용히 태울 수 있어.

빡빡한 timeout 설정:

  • Job level timeout-minutes: — 전체 job cap.
  • Step level timeout-minutes: — 개별 step cap.

합리적 default

Job 유형합리적 cap
Lint / format5 분
Unit test10-15 분
Integration / e2e30-45 분
Deploy15-30 분
Release pipeline60 분

Job 이 cap 치면 run 실패. 그게 옳은 동작 — 왜 그렇게 오래 걸렸는지 조사.

Code

Job + step timeout·yaml
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 15        # whole-job cap
    steps:
      - uses: actions/checkout@v4
      - run: pip install -e '.[dev]'
        timeout-minutes: 5     # install must not hang
      - run: pytest -q
        timeout-minutes: 10    # tests must complete in 10

External links

Exercise

Workflow 의 모든 job 에 timeout-minutes 추가. 최근 p95 runtime 의 1.5× 를 cap 으로. Push 하고 몇 run 봐서 잘려나가는 거 없는지 확인.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.