3441321 发表于 2015-7-17 09:26:56

tomcat中间件提交表单数据量过大警告处理方案

                      昨天系统出现了一个比较奇怪的BUG,表单提交后,数据没有全部执行。
查看tomcat日志发现有以下警告:

18:52:23,058WARN HttpMethodBase:682 - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
18:52:31,290WARN HttpMethodBase:682 - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
18:52:36,233WARN HttpMethodBase:682 - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
Jul 15, 2015 6:53:10 PM org.apache.tomcat.util.http.Parameters processParameters
INFO: More than the maximum number of request parameters (GET plus POST) for a single request () were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
Note: further occurrences of this error will be logged at DEBUG level.

查询相关资料后,发现是因为tomcat有提交参数的限制。

修改tomcatconf/server.xml文件,添加:
<Connector executor="tomcatThreadPool"
port="9080"
protocol="HTTP/1.1"
maxParameterCount="-1"
connectionTimeout="20000"
URIEncoding="UTF-8" />

maxParameterCount="-1" 表示无限制
                   

页: [1]
查看完整版本: tomcat中间件提交表单数据量过大警告处理方案