Getting 'Request Entity Too Large' after editing a Confluence page
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When users try to edit a page, it fails with error 'Request Entity Too Large' in their browsers
Environment
Confluence 7.4.
Diagnosis
Users receive a 'Request Entity Too Large' followed by "The requested resource does not allow request data with POST requests, or the amount of data provided in the requests exceeds the capacity limit" when editing a page.
The message in the browser will look like this:
Cause
The Tomcat connector maxPostSize is too small.
Solution
Please, increase maxPostSize value or add (if not present) maxPostSize parameter in your Tomcat connector to mitigate this issue:
- Shutdown Confluence
- Backup
/data/atlassian/confluence/conf/server.xml
Edit
/data/atlassian/confluence/conf/server.xml
From:<Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="1500" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="<YOUR_PROXY_NAME>" proxyPort="443" scheme="https" maxHttpHeaderSize="32768"
To:
<Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="1500" maxPostSize="16777216" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="<YOUR_PROXY_NAME>" proxyPort="443" scheme="https" maxHttpHeaderSize="32768"
- Start Confluence