2026-10-02 · Q&A guide

Fix 413 Request Entity Too Large in Postman with JBoss AJP

Learn why Postman can trigger a 413 error on JBoss AJP connections and how to adjust server settings to accept larger payloads.

What a 413 response really means

The HTTP 413 status tells the server that the request body exceeds the size it is willing to process. The limit can be enforced by the web container, a reverse proxy, or the AJP connector itself. When the limit is hit, the server aborts the request before it reaches your application code, which is why you see the error even if the service works with other tools.

Why Postman may behave differently from other clients

Postman sends the request body in a single chunk, while some browsers or REST extensions stream the data in smaller pieces. AJP buffers the whole request before forwarding it to JBoss, so a single large chunk can exceed the configured buffer size. Additionally, Postman's default "Content‑Length" header is accurate, whereas some tools omit it, causing the connector to fall back to a safe default limit.

AJP connector limits in JBoss

JBoss (WildFly/EAP) exposes two relevant attributes on the AJP listener:

* **maxPacketSize** – maximum size of a single AJP packet (default 8192 bytes). * **maxPostSize** – maximum size of the HTTP request body that the connector will accept (default 2097152 bytes = 2 MiB).

If either value is smaller than the payload, the connector returns 413 before the request reaches the servlet.

**Example configuration (standalone.xml)**:

<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" max-packet-size="65536" max-post-size="10485760"/>

Adjusting JBoss and any front‑end proxy

1. Increase **max-packet-size** to at least the size of the largest chunk Postman will send (e.g., 64 KB). 2. Raise **max-post-size** to cover the expected payload (e.g., 10 MB). 3. If an Apache httpd or Nginx proxy sits in front of JBoss, also raise its **LimitRequestBody** (Apache) or **client_max_body_size** (Nginx). 4. Restart the server after editing the XML or CLI configuration. 5. Verify the new limits with the JBoss CLI: `/:read-attribute(name=socket-binding-group)` or by checking the log for "AJP listener started" messages.

Testing the fix with Postman

After the server restart, resend the same request from Postman. Ensure the "Content‑Length" header reflects the new size and that the body is still sent as a single chunk. If the response is now 200/201, the issue was the AJP buffer. If it still fails, double‑check any upstream proxy configuration or firewall that might impose its own limits.

Takeaway: Synchronize Postman's request size with JBoss AJP's max‑packet and max‑post settings to eliminate 413 errors.

People also ask

What is the default max‑post size for JBoss AJP?

The default is 2 MiB (2097152 bytes) unless overridden in the connector definition.

Does Postman have an internal request size limit?

Postman itself does not limit payload size, but it sends the body in one chunk, which can exceed server‑side limits.

Inspired by a public discussion on Stack Overflow. This article is an original explanation for learners.

← All posts