KB-1161 "HTTP/1.1 413 Request Entity Too Large"/"Email body failed to render" errors thrown in application server log


Users may experience one of the following symptoms:

Symptom 1

The HTTP File Upload Smart Service fails to upload files larger than 64KB (the threshold can be larger) with the following message in the application server log:

com.appian.integration.httpclient.smartnode.HttpFileUploadSmartNode - ConnectorRuntimeException [title=HTTP error connecting to ##URL##, com.appian.integration.core.exception.ConnectorRuntimeException: HTTP/1.1 413 Request Entity Too Large] 

In the smart service’s output, an HTTP response code of 413 is returned.

Symptom 2

Appian auto-generated email alerts are not sent by the server with the following error in the application server log:

... Caused by: java.io.IOException: Server returned HTTP response code: 414 for URL: XXXX Caused by: com.appiancorp.process.engine.EmailBodyException: Email body failed to render: MailBody{filename=/ntf/emailHtml/XXXX_emailHtml.jsp} 

Symptom 3

When a specific user performs an action that works for other users, like clicking on a form, task or report, they receive a generic error like one of the following:

An internal error has occurred. The page could not be loaded. [HTTP Code = 413] (APNX-1-4279-001) 

The System Has Encountered an Error. 
HTTP Code: 413
The system has encountered an error. Please try again later.

If using Apache, the following error can be observed in the mod_jk.log:

[error] ajp_marshal_into_msgb::jk_ajp_common.c (469): failed appending the header value” in the mod_jk log. 

Symptom 4

The user experiences a HTTP 500 Error when navigating to: */suite/rest/a/applications/latest/app/design/monitoring:

The following entries are printed to the tomcat-stdOut.log:

com.appiancorp.rest.shared.FallbackExceptionMapper - Internal Server Error on REST API invocation. java.lang.IllegalArgumentException: Header message of length [x] received but the packetSize is only [8,192]  at org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:636)  at org.apache.coyote.ajp.AjpProcessor.receive(AjpProcessor.java:577)


This usually occurs because the web server has received a request that is larger than the configured limit. The web server is currently configured to limit the file size and will throw an error when it receives a request that is too large.

Depending on the exact action being performed by the user, and the subsequent request being made to the web server, the error could be due to the size of the request’s header, message body or the total size of the request as a whole.


To prevent this error from reoccurring, and to allow the requests to be fulfilled by the web server, raise the maximum allowed size for the area of the message (header, body, etc) that is causing the error.

For Symptoms 1 and 2

When the size of the request’s body is too large:

For IIS, the maxReceivedMessageSize parameter will have to be increased. By default, it is 64KB to prevent DOS attacks. For Apache, the parameter to be modified is LimitRequestBody.

For Symptoms 3 and 4

When the size of the request’s header is too large:


  1. Add the following properties to the JBoss standalone.xml file under the <system-properties> tag:
    <property name="org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE" value="65535"/>
    <property name="org.apache.coyote.ajp.MAX_PACKET_SIZE" value="65536"/>  
  2. Restart the application server.


  1. Find the <connector> tag in the Tomcat server.xml file (Located in the directory <APPIAN_HOME>\tomcat\apache-tomcat\conf) for the AJP and HTTP protocol:
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
    <Connector port="9080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/> 
  2. Add the packetSize property to the AJP tag, the default is set to 8192 and the max is 65536. Add the maxHttpHeaderSize property to the HTTP tag, the max is 65536:
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" packetSize="24576"/>
    <Connector port="9080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxHttpHeaderSize="65535"/> 
  3. Restart the application server.

Note: If any of the referenced tags are not present in the server.xml file, add them exactly as they are written in the above examples.

Additional Configurations if Using IIS as a Web Server

  1. Add the following property to the IIS workers.properties file (Located in the directory <ISAPI_HOME>\conf) matching the AJP value previously set in the server.xml file:
  2. Restart IIS.

Additional Configurations if Using Apache as a Web Server

  1. Add the following property LimitRequestFieldSize in the Apache httpd.conf file (Located in the <APACHE_Home>\conf) matching the HTTP value previously set in the server.xml file:
      LimitRequestFieldSize 65535

        2. Restart Apache

If Error Code 413 only occurs for one user please proceed with the following steps:

  1. Attempt to reproduce the issue while using the browser's Private/Incognito mode.
    1. If the issue cannot be reproduced in Private/Incognito mode, continue with step 2.
    2. If it the issue is still present, create a support case with Appian Support.
  2. Clear the cache and all cookies on your browser using the instructions provided in the browser documentation.
  3. Restart the browser and attempt to repeat the action that caused the 413 error.

If the steps above do not resolve the issue and the user is on Internet Explorer, continue with the following steps:

  1. Select Tools Developer Tools.
  2. Select the Console tab.
  3. Run the following string within the IE Dev Console: javascript:document.execCommand("ClearAuthenticationCache");
  4. Press the Enter key.
  5. The following should be output on the console:

Affected Versions

This article applies to all versions of Appian Self-managed.

Last Reviewed: January 2021