java.lang.IllegalStateException: Parameter count exceeded allowed maximum: 512
Issue
- One of the following errors are seen in the logs:
2012-04-13 09:38:04,742 ERROR [org.apache.wicket.RequestCycle] (ajp-0.0.0.0-8009-224) Parameter count exceeded allowed maximum: 512
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.getParameter(Request.java:1060)
at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)
java.lang.IllegalStateException: More than the maximum number of request parameters (GET plus POST) for a single request ([512]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
org.apache.tomcat.util.http.Parameters.addParameter(Parameters.java:199)
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:383)
org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:229)
org.apache.catalina.connector.Request.parseParameters(Request.java:2874)
org.apache.catalina.connector.Request.getParameterNames(Request.java:1333)
org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:379)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1225)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
-
Setting the system property resolves the issue. But, will there be any performance overhead by setting the value of
org.apache.tomcat.util.http.Parameters.MAX_COUNT
to a higher value ? -
If there are example, 50 applications deployed in a JBoss instance and only one of them encounters the above exception, will there be any performance impact for setting the value here for the system property ?
-
Was the parameter
-Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT
decreased from JBoss EAP 5.0 to EAP 5.2?
For EAP 6.x following errors are seen in the logs:
15:09:52,780 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/hello].[jsp]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for servlet jsp threw exception: java.lang.IllegalStateException: JBWEB002004: More than the maximum number of request parameters (GET plus POST) for a single request (512) 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:184) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:360) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:213) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.connector.Request.parseParameters(Request.java:2858) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.connector.Request.getParameter(Request.java:1279) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 5.2.0+
- 5.1.2 (With security patch JBPAPP-7790 applied)
- 4.3.0 CP10 (With security patch JBPAPP-7862 applied)
or
- Red Hat Enterprise Linux (RHEL) v.6
- tomcat6 version >= 6.0.24-36.el6_2
or
- tomcat6 version >= 6.0.24-36.el6_2
- Red Hat Enterprise Linux (RHEL) v.5
- tomcat5 version >= 5.5.23-0jpp.31.el5_8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.