tool::http-status-detail
413 Content Too Large
The request body exceeds the server's size limit.
ステータスコード
413
名前
Content Too Large
カテゴリ
4xx詳細説明
HTTP 413 Content Too Large(旧:Request Entity Too Large)は、リクエストボディのサイズがサーバーの許可する最大サイズを超えていることを示します。大容量ファイルのアップロード、大きなJSONペイロード、またはサーバー設定のサイズ制限に引っかかった場合に発生します。
主な原因
- ▸サーバーのアップロードサイズ制限を超えるファイルのアップロード
- ▸APIリクエストボディがサーバーの最大ペイロード制限を超過
- ▸Nginxのclient_max_body_size設定を超過
- ▸クラウド関数のリクエストサイズ制限超過(AWS Lambda: 6MBなど)
解決方法
- 1.Nginxのclient_max_body_sizeの値を増やしてください(例:client_max_body_size 50M)
- 2.大容量ファイルはチャンクアップロードや署名付きURL(Pre-signed URL)方式を使用してください
- 3.JSONペイロードを減らすかページネーションを適用してください
- 4.Retry-Afterヘッダーがある場合は指定時間後に再試行してください
関連HTTPヘッダー
Content-LengthRetry-Afterレスポンス例
HTTP/1.1 413 Content Too Large
Content-Type: application/json
{"error":"payload_too_large","message":"Request body exceeds 10MB limit","maxSize":"10MB"}関連ステータスコード
400Bad RequestThe server could not understand the request due to invalid syntax.→401UnauthorizedAuthentication is required and has failed or not been provided.→402Payment RequiredReserved for future use; some services use it for payment walls.→403ForbiddenThe server refuses to fulfill the request (authenticated but unauthorized).→404Not FoundThe requested resource could not be found.→
ad · 300×250
// related tools