http参数MAX_COUNT个wildfly的默认值是什么? [英] What is default value for http parameters MAX_COUNT wildfly?
问题描述
我们已将jboss升级为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.
在旧版的jboss中,我们收到此错误消息
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]
现在要验证此问题,我们想知道http参数MAX_COUNT的默认值是什么.
Now to verify this issue we wanted to know what is the default value for http parameters MAX_COUNT.
在谷歌搜索中,我发现此讨论没有提供太多有关如何修复的信息 http://lists.jboss.org/pipermail/undertow- dev/2013-April/000287.html
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
推荐答案
如果要修改,最大参数计数的默认值为" 1000 "
Default value of max parameter count is "1000", if you want to modify it
在wildfly中,我们必须在http-listener中使用"max-parameters"属性.
In wildfly we have to use "max-parameters" attribute in http-listener.
<http-listener name="default" socket-binding="http" max-parameters="10000"/>
有关文档,请参考这里
在7.x版本中,您可以通过以下更改进行修复
In 7.x version you can fix by below change
org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
对于旧版本的jboss最大参数计数,请参见此处
For older version of jboss max parameter count discussed here
这篇关于http参数MAX_COUNT个wildfly的默认值是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!