在将原来32位TOMCAT版本更换到64位版本下出现服务器每次只能接收9999条数据.


经过追踪服务器日志获取如下信息: 

org.apache.tomcat.util.http.Parameters processParameters

INFO: More than the maximum number of request parameters (GET plus POST) for a single request ([10,000]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attr

ibute on the Connector.

Note: further occurrences of this error will be logged at DEBUG level.

    

因此可知是当前Tomcat服务器默认最大http提交参数数量为10000,我们单次提交的参数(项目等信息)已超过此数值。通过加大此参数,问题得到解决。

 

深层原因分析:

由于各版本的Tomcat服务器本身存在差异,我们在服务器升级时虽然采用了同样的版本的Tomcat,但由于服务器从32位升级为64位后,Tomcat的默认参数发生了改变。

我们的服务器切换测试是没有超过10000个http参数提交和获取的测试用例的,因此此问题未及时发现。

修改标红区域数字:

 <Connector port="8080" protocol="HTTP/1.1" maxHttpHeaderSize="8192" useBodyEncodingForURI="true"

               connectionTimeout="30000" maxThreads="1000" minSpareThreads="100" maxSpareThreads="500"

               enableLookups="false" disableUploadTimeout="true"

               redirectPort="8443" URIEncoding="UTF-8" acceptCount="500" compression="on"

               compressionMinSize="2048" minProcessors="100" maxProcessors="500" maxPostSize="0" maxParameterCount="60000"

               noCompressionUserAgents="gozilla, traviata"

               compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain" />

    <!-- A "Connector" using the shared thread pool-->