You are currently reviewing an older revision of this page.

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

Symptoms

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 pink box error:

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

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.

Cause

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.

Action

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 Symptom 3

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

JBoss

  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.

Tomcat

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

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 value previously set to the server.xml file:
    worker.ajp13w1.max_packet_size=24576
    worker.ajp13w2.max_packet_size=24576
  2. Restart IIS.
If Error Code 413 only occurs for one user please proceed with the following steps:
  1. Test whether the issue if the issue can be reproduced while 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 reproduced please 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 your 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 > Select 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 outputted on the console:

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: September 2019