Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is default value for http parameters MAX_COUNT wildfly?

We have upgraded jboss to wildfly , in older version we were facing some issue like this Maximum number of parameter passed in a post.

In older version of jboss we got this error message

2015-02-10 20:04:34,582 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sf].[action]] (http--
    127.0.0.1-8080-38) Servlet.service() for servlet action threw exception: java.lang.IllegalStateException: More than the 
    maximum number of request parameters (GET plus POST) for a single request ([5,000]) were detected. Any parameters beyond
     this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
    at org.apache.tomcat.util.http.Parameters.addParameter(Parameters.java:199) [jbossweb-7.0.13.Final.jar:]
    at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:382) [jbossweb-7.0.13.Final.jar:]
    at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:229) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.connector.Request.parseParameters(Request.java:2874) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.connector.Request.getParameterNames(Request.java:1333) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:379) [jbossweb-7.0.13.Final.jar:]
    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1225) [struts.jar:1.1]

Now to verify this issue we wanted to know what is the default value for http parameters MAX_COUNT.

On googling i found this discussion where there is no much information provided, on how it is fixed http://lists.jboss.org/pipermail/undertow-dev/2013-April/000287.html

like image 910
prem Avatar asked Feb 09 '23 08:02

prem


1 Answers

Default value of max parameter count is "1000", if you want to modify it

In wildfly we have to use "max-parameters" attribute in http-listener.

<http-listener name="default" socket-binding="http" max-parameters="10000"/>

For documentation please refer here

In 7.x version you can fix by below change

org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000

For older version of jboss max parameter count discussed here

like image 177
prem Avatar answered Mar 04 '23 02:03

prem