Jira Custom Fields search page throws Internal Server Error with large search string

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

Entering a large search string in the ⚙️ → Issues → Custom fields search box results in an Internal Server Error:

The browser developer tools shows a HTTP Status 400 – Bad Request: Request header is too large.

The following may appear in the atlassian-jira.log:

{code:java}
HTTP Status 400 – Bad Request
Type Exception Report

Message Request header is too large

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Exception

java.lang.IllegalArgumentException: Request header is too large
	org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:726)
	org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:873)
	org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:579)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:700)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Unknown Source)
Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/8.5.42
{code}

Cause

The page is passing the search parameter as part of the request URL which results in the HTTP headers hitting a hard-limit in Tomcat.

Resolution

You can adjust the maxHttpHeaderSize variable to increase the maximum size of the request and response HTTP header.

  • Open the <jira-install>/conf/server.xml.

  • Edit the <Connector> element and adjust the parameter to the desired size, specified in bytes:

    server.xml
     <Connector [other attributes] maxHttpHeaderSize="newlimit"/>

For more info, check out Apache Tomcat: The HTTP Connector.

Description
Increase maxHttpHeaderSize for internal server error on custom fields search
ProductJira, Jira Server, Jira Software, Jira Service Management
Last modified on Nov 23, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.