414 URI Too Long은 요청한 URI가 서버가 해석할 수 있는 최대 길이를 넘었다는 뜻입니다. 대부분 GET 쿼리 스트링에 너무 많은 데이터를 실었을 때 발생합니다.
명세상 URL 길이 상한은 없지만, 실제로는 서버·프록시·브라우저마다 한도가 있습니다(흔히 8KB 안팎). 수백 개의 ID나 인코딩된 상태를 쿼리 파라미터로 넘기면 이 한도를 넘기기 쉽습니다.
GET /search?q=aaaaaaaa...<8000+ chars>...zzzz HTTP/1.1
Host: example.comHTTP/1.1 414 URI Too Long
Content-Type: text/html
Content-Length: 40
<h1>414 Request-URI Too Long</h1># Raise the buffers that hold the request line + URI
server {
large_client_header_buffers 4 16k;
}// Instead of a giant query string, POST the filter as JSON
await fetch('/search', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ ids: hugeArray })
});