Parameter count exceeded allowed maximum 512 Error
We used to get below mentioned error while creating or selecting multiple reports to generate in applications deployed in Jboss. Few times it used to error as “Internal Server Error”. After few searching we found the solution, please follow the steps mentioned to fix the issue.
Error In Logs:
java.lang.IllegalStateException: Parameter count exceeded allowed maximum: 512
at org.apache.tomcat.util.http.Parameters.addField(Parameters.java:218)
at org.apache.tomcat.util.http.Parameters.addParam(Parameters.java:337)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:417)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:368)
at org.apache.catalina.connector.Request.parseParameters(Request.java:2568)
at org.apache.catalina.connector.Request.getParameterValues(Request.java:1118)
at org.apache.catalina.connector.RequestFacade.getParameterValues(RequestFacade.java:396)
We need to increase the http.Parameters.MAX_COUNT to higher value to fix the issue. To set the value to some higher value please either of below two steps:
– Navigate to <jboss_home>/jboss-as/server/default/deploy/ folder and open properties-service.xml and add below entries before tag.
org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
– Restart the JBOSS server.
OR
– Go to the bin directory of JBoss installed location.i.e. JBOSS_HOME/bin
– Open run.sh file in vi editor and add the below parameter in JAVA_OPTIONS “E.g: export JAVA_OPTS”
-Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
– Restart the JBOSS server.
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.
Can we increase the count greater than 10000?
org.apache.tomcat.util.http.Parameters.MAX_COUNT =
The maximum amount of parameters that can be parsed in a post body. If exceeded, parsing will fail using an IllegalStateException. The default value is 512 parameters.
To my knowledge yes you can increase it to higher values but do remember very high value is a security risk https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4858