Getting "Request header is too large" due to Labels length
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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 adding multiple labels to a Confluence pages and the labels are very long (label names must be less than 255 characters), the following error appears:
java.lang.IllegalArgumentException: Request header is too large
Cause
The query string is so long it hits the Tomcat header size limit.
Resolution
Option 1)
Reduce the length of the label names (suggested option)
Option 2)
Edit the server.xml
property as follows:
- Go to
<confluence-installation>\conf\server.xml
- In the
<Connector/>
tag, add the propertymaxHttpHeaderSize
. This property defaults to 8192, but you can increase it to suit your needs. Setting it to 40960 should accommodate your absolute maximum use case.