408

개요

408 Request Timeout은 서버가 클라이언트로부터 완전한 요청을 받기까지 기다리다가 제한 시간을 넘겨 연결을 정리했음을 뜻합니다. 클라이언트가 요청 라인·헤더·본문을 너무 느리게 보내는 것이 원인입니다.

서버 내부나 업스트림 처리가 느린 504 Gateway Timeout과 달리, 408은 요청을 "보내는" 쪽(클라이언트)이 느린 경우라는 점이 핵심 차이입니다.

언제 발생하나

요청 / 응답 예시

요청
POST /upload HTTP/1.1
Host: example.com
Content-Length: 5000000

(client stalls; body never fully arrives within the server's timeout)
응답
HTTP/1.1 408 Request Timeout
Connection: close
Content-Type: text/html

<h1>Request Timeout</h1>

코드로 보기

# server waits this long for the client to send the request body
client_body_timeout 12s;
client_header_timeout 12s;  # slow clients -> 408

흔한 원인

해결 방법

실무 참고

관련 상태코드

관련 헤더

스펙 근거