How to set request header size for jetty

4,789 views
Skip to first unread message

Andreas Müller

unread,
Nov 11, 2015, 9:41:12 AM11/11/15
to Jenkins Users
Hi,

the Jetty as bundled with jenkins cannot deal with headers larger than 8kB, but Jetty
can be configured to deal with larger headers, there is a setRequestHeaderSize() method
to the org.eclipse.jetty.server.HttpConfiguration class for this purpose. But what is the
accepted method to configure this for the Jetty in jenkins.war?

Best regards

Andreas Müller


Victor Martinez

unread,
Nov 11, 2015, 4:51:16 PM11/11/15
to Jenkins Users

Mohammed Zahriya

unread,
Jul 27, 2016, 12:38:41 PM7/27/16
to Jenkins Users
HI Andreas,

were you able to resolve this issue? We have Jenkins installed on Linux using the RPM and need to increase the header size to get our SSO operational. What configuration file and parameter did you update to resolve the issue?

Error Currently encountered:

org.eclipse.jetty.util.log.JavaUtilLog warn

WARNING: Header is too large >8192

stanis...@gmail.com

unread,
May 19, 2017, 10:02:36 AM5/19/17
to Jenkins Users
Please try this:

workaround this by adding -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 in the <arguments> XML node of <some_path>Jenkins\jenkins.xml 

stanis...@gmail.com

unread,
May 19, 2017, 10:02:42 AM5/19/17
to Jenkins Users
hi

May 19, 2017 10:05:33 AM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Header is too large >8192


I added such options in jenkins.xml and it is resolved issue:
  <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dorg.eclipse.jetty.server.HttpConfiguration.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.HttpConfiguration.responseHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -jar "%BASE%\jenkins.war" --httpPort=8080 --requestHeaderSize=32768 --webroot="%BASE%\war"</arguments>




Reply all
Reply to author
Forward
0 new messages