The request body exceeds the maximum size the server is willing to process.
The server is refusing to process the request because the request payload (body) is larger than the server is willing or able to handle. Previously known as "413 Request Entity Too Large." The server may close the connection to prevent the client from continuing to send data.
A 413 error occurs when you send a request body that exceeds the server's configured maximum size. This is most commonly encountered during file uploads, large JSON/XML payload submissions, or when posting form data with many fields or large values.
The limit can be enforced at multiple layers: the web server (Nginx, Apache), the application framework (Express, Django), the CDN (Cloudflare), or even the hosting platform (AWS Lambda, Vercel). Each layer may have its own independent limit.
Platform-Specific Notes:
Nginx Default is 1MB. Increase with client_max_body_size 100M; in http, server, or location block. Reload after changes.
Apache Use LimitRequestBody 104857600 (100MB in bytes) in httpd.conf or .htaccess. For PHP: set upload_max_filesize and post_max_size in php.ini.
Cloudflare Free plan: 100MB max upload. Pro: 100MB. Business: 200MB. Enterprise: 500MB. Cannot be exceeded regardless of origin server settings.
Node.js Express body-parser defaults to 100KB for JSON. Increase with app.use(express.json({ limit: '50mb' })).
client_max_body_size (Nginx) or LimitRequestBody (Apache) to a higher valueexpress.json({ limit }) or equivalent framework setting# Client tries to upload a 50MB file (server limit: 10MB) POST /api/upload HTTP/1.1 Host: example.com Content-Type: multipart/form-data; boundary=----abc123 Content-Length: 52428800 # Server Response HTTP/1.1 413 Payload Too Large Content-Type: application/json Connection: close Retry-After: 3600 { "error": "Payload Too Large", "message": "Request body exceeds the 10MB limit", "max_size": "10MB", "your_size": "50MB", "statusCode": 413 }
client_max_body_size directive in your Nginx configuration. For example, client_max_body_size 100M; allows uploads up to 100 megabytes. You can place this in the http block (applies globally), server block (applies to one domain), or location block (applies to specific paths). After changing the config, reload Nginx with sudo nginx -s reload.client_max_body_size). Apache has no hard default, but PHP defaults to 2MB (upload_max_filesize) and 8MB (post_max_size). Express/Node.js body-parser defaults to 100KB for JSON bodies. Cloudflare limits uploads to 100MB on free and Pro plans. Always check all layers in your stack, as the strictest limit wins.Detect upload failures, misconfigured limits, and server errors across your web infrastructure.
Start Free Scan