Skip to content

[JENKINS-60409] Form Submission Length Cap #20741

Closed

Description

@jenkins-infra-bot

*Jenkins LTS Notice*: Jenkins LTS 2.204.3 and 2.204.4 are also affected due to the Winstone upgrade which was introduced as a part of the JENKINS-57888 fix backporting. Please see https://groups.google.com/forum/#!topic/jenkinsci-dev/M_RtDuDXtbU for the discussion and retrospective

In Jenkins Version 2.205, PR #4339 moved the cloud configuration from Configure System into is own configuration form on the Manage Nodes page. There is a cap to the length of this form (200000) and prevents me from adding additional docker clouds into the settings.

java.lang.IllegalStateException: Form is larger than max length 200000
	at org.eclipse.jetty.server.Request.extractFormParameters(Request.java:562)
	at org.eclipse.jetty.server.Request.extractContentParameters(Request.java:519)
	at org.eclipse.jetty.server.Request.getParameters(Request.java:430)
Caused: org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content
	at org.eclipse.jetty.server.Request.getParameters(Request.java:434)
	at org.eclipse.jetty.server.Request.getParameterNames(Request.java:1077)
	at hudson.security.csrf.CrumbFilter.extractCrumbFromRequest(CrumbFilter.java:112)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:512)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:500)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Thread.java:748)

Originally reported by mastershihochief, imported from: Form Submission Length Cap
  • assignee: jglick
  • status: Resolved
  • priority: Critical
  • component(s): core, winstone-jetty
  • label(s): 2.204.5-fixed, 2.222.1-fixed, regression
  • resolution: Fixed
  • resolved: 2020-03-06T20:40:46+00:00
  • votes: 12
  • watchers: 22
  • imported: 2025-11-24
Raw content of original issue

*Jenkins LTS Notice*: Jenkins LTS 2.204.3 and 2.204.4 are also affected due to the Winstone upgrade which was introduced as a part of the JENKINS-57888 fix backporting. Please see https://groups.google.com/forum/#!topic/jenkinsci-dev/M_RtDuDXtbU for the discussion and retrospective

In Jenkins Version 2.205, PR #4339 moved the cloud configuration from Configure System into is own configuration form on the Manage Nodes page. There is a cap to the length of this form (200000) and prevents me from adding additional docker clouds into the settings.

java.lang.IllegalStateException: Form is larger than max length 200000
	at org.eclipse.jetty.server.Request.extractFormParameters(Request.java:562)
	at org.eclipse.jetty.server.Request.extractContentParameters(Request.java:519)
	at org.eclipse.jetty.server.Request.getParameters(Request.java:430)
Caused: org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content
	at org.eclipse.jetty.server.Request.getParameters(Request.java:434)
	at org.eclipse.jetty.server.Request.getParameterNames(Request.java:1077)
	at hudson.security.csrf.CrumbFilter.extractCrumbFromRequest(CrumbFilter.java:112)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:512)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:500)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Thread.java:748)
environment
Jenkins 2.205+, Jenkins LTS 2.204.3 and 2.204.4<br/>
Winstone 5.5 to 5.8
2 attachments

Activity

  1. jenkins-infra-bot commented on Dec 9, 2019

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Dec 10, 2019

    @jenkins-infra-bot
    Author
    mahmoud_ksemtini:
    • Original comment link
    • Raw content of original comment:

      I get the same error when trying to replay a job from the UI.  (Jenkins Version 2.205)

    I get the same error when trying to replay a job from the UI.  (Jenkins Version 2.205)

  3. jenkins-infra-bot commented on Dec 10, 2019

    @jenkins-infra-bot
    Author
    dean:
    • Original comment link
    • Raw content of original comment:

      We have also been experiencing the same error when replaying builds since 2.205.

      It seems to only be for jobs with a large Jenkinsfile (84,100 characters/ ~1800 lines) but not jobs with smaller Jenkinsfiles, although even the large ones are below 200,000 characters.

    We have also been experiencing the same error when replaying builds since 2.205.

    It seems to only be for jobs with a large Jenkinsfile (84,100 characters/ ~1800 lines) but not jobs with smaller Jenkinsfiles, although even the large ones are below 200,000 characters.

  4. jenkins-infra-bot commented on Dec 11, 2019

    @jenkins-infra-bot
    Author
    pedkoz:
    • Original comment link
    • Raw content of original comment:

      Hi guys,

      I am facing the same issue when I try to give access to a new user into my permission matrix Role. I guess it happens in cloud version, but I am facing it in the not cloud version 2.207. I am forced to get back to my previous version 2.196 

       

      Regards,

    Hi guys,

    I am facing the same issue when I try to give access to a new user into my permission matrix Role. I guess it happens in cloud version, but I am facing it in the not cloud version 2.207. I am forced to get back to my previous version 2.196 

     

    Regards,

  5. jenkins-infra-bot commented on Dec 18, 2019

    @jenkins-infra-bot
    Author
    jwnmulder:
    • Original comment link
    • Raw content of original comment:

      Running jenkins with -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000" did resolve the issue for us

    Running jenkins with -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000" did resolve the issue for us

  6. jenkins-infra-bot commented on Dec 18, 2019

    @jenkins-infra-bot
    Author
    oleg_nenashev:

    danielbeck

  7. jenkins-infra-bot commented on Dec 19, 2019

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      oleg_nenashev

      A comment from a week ago stated:

      We have also been experiencing the same error when replaying builds since 2.205.

      Clearly this isn't my PR that only moved some form fields in the global configs around.


      I suggest you look at the Winstone/Jetty update. This looks interesting:

       + 3856 Different behaviour with maxFormContentSize=0 if Content-Length header is present/missing

    oleg_nenashev

    A comment from a week ago stated:

    We have also been experiencing the same error when replaying builds since 2.205.

    Clearly this isn't my PR that only moved some form fields in the global configs around.


    I suggest you look at the Winstone/Jetty update. This looks interesting:

     + 3856 Different behaviour with maxFormContentSize=0 if Content-Length header is present/missing

  8. jenkins-infra-bot commented on Dec 19, 2019

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      I just backported 4339 onto 2.204 and the form works like a charm with the same content that makes 2.205 fail. Whatever is going on here has absolutely nothing to do with that PR.

    I just backported 4339 onto 2.204 and the form works like a charm with the same content that makes 2.205 fail. Whatever is going on here has absolutely nothing to do with that PR.

  9. jenkins-infra-bot commented on Dec 19, 2019

    @jenkins-infra-bot
    Author
    dean:
    • Original comment link
    • Raw content of original comment:

      Running jenkins with -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000" did resolve the issue for us

      This resolved the issue for us as well. 

      I agree that it looks to be nothing to do with any core Jenkins changes but instead Winstone/Jetty library changes that curtailed this limit.

    Running jenkins with -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000" did resolve the issue for us

    This resolved the issue for us as well. 

    I agree that it looks to be nothing to do with any core Jenkins changes but instead Winstone/Jetty library changes that curtailed this limit.

  10. jenkins-infra-bot commented on Feb 25, 2020

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      We just received a bunch of new reports, linked them to this ticket.

      olamy any hints on the Jetty side? "+ 3856 Different behaviour with maxFormContentSize=0 if Content-Length header is present/missing" mentioned by danielbeck makes me think we need to alter the defaults in Winstone to restore the original behavior

    We just received a bunch of new reports, linked them to this ticket.

    olamy any hints on the Jetty side? "+ 3856 Different behaviour with maxFormContentSize=0 if Content-Length header is present/missing" mentioned by danielbeck makes me think we need to alter the defaults in Winstone to restore the original behavior

  11. jenkins-infra-bot commented on Feb 26, 2020

    @jenkins-infra-bot
    Author
    olamy:
    • Original comment link
    • Raw content of original comment:

      I guess we need to update  the default value. maybe something around 500000? I reckon it's a bit sensible to change that. but a default with no size limit is weird.....

    I guess we need to update  the default value. maybe something around 500000? I reckon it's a bit sensible to change that. but a default with no size limit is weird.....

  12. jenkins-infra-bot commented on Feb 26, 2020

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      Would go an order of magnitude up or so to give us breathing room. Given the UI of Jenkins, long form submissions are expected (and 4339 actually helps with that instead of causing the problem…).

      I wonder whether there's a good location to document the system property and the need to set it in instances with very complex configurations.

    Would go an order of magnitude up or so to give us breathing room. Given the UI of Jenkins, long form submissions are expected (and 4339 actually helps with that instead of causing the problem…).

    I wonder whether there's a good location to document the system property and the need to set it in instances with very complex configurations.

  13. jenkins-infra-bot commented on Feb 26, 2020

    @jenkins-infra-bot
    Author
    oleg_nenashev:
    • Original comment link
    • Raw content of original comment:

      Marked as an lts-candidate. Taking the number of reports, we would be interested to backport a fix to the next LTS .1 if we have one

    Marked as an lts-candidate. Taking the number of reports, we would be interested to backport a fix to the next LTS .1 if we have one

  14. jenkins-infra-bot commented on Feb 26, 2020

    @jenkins-infra-bot
    Author
    brianodriscoll:
    • Original comment link
    • Raw content of original comment:

      Hi Oleg,

      So we used the workaround advised in JENKINS-60409. First our senior picked it up to 400k but it didn't fix the issue.- (still too small for the POST size we are doing), then picked it up to 1M and it began to work properly. Kind Regards Brian

    Hi Oleg,

    So we used the workaround advised in JENKINS-60409.
    First our senior picked it up to 400k but it didn't fix the issue.- (still too small for the POST size we are doing), then picked it up to 1M and it began to work properly.
    Kind Regards
    Brian

  15. jenkins-infra-bot commented on Feb 27, 2020

    @jenkins-infra-bot
    Author
    raihaan:

    https://github.com/eclipse/jetty.project/blob/65a22e5e809ecbd20b3475cd8644fdf7aa5e8490/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java#L148

     

    This looks like where the default size is set. Even if we do bump it, we would require that jetty releases and we then update winstone.

  16. 15 remaining items

  17. jenkins-infra-bot commented on Mar 24, 2020

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      jonesbusy

      same issue

      It's not. Note how the error message is completely different. You're looking for JENKINS-61409.

    jonesbusy

    same issue

    It's not. Note how the error message is completely different. You're looking for JENKINS-61409.

  18. jenkins-infra-bot commented on Mar 24, 2020

    @jenkins-infra-bot
    Author
    jonesbusy:

    jglick Ok thanks

  19. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-60968]

  20. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-61226]

  21. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-61307]

  22. jenkins-infra-bot commented on Nov 24, 2025

    @jenkins-infra-bot
    Author

    [Original is_duplicated_by from Jira: JENKINS-60984]

  23. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions