標籤:tomcat 最佳化 maximum number of re 大資料 change this limit
關於tomcat的一個最佳化問題:
有時候儲存大資料量的資料時,tomcat不最佳化的話,頁面會沒反應,tomcat後台並不報錯,只是提示下面內容:
警告: More than the maximum number of request parameters (GET plus POST) for a s
ingle request ([10,000]) were detected. Any parameters beyond this limit have be
en ignored. To change this limit, set the maxParameterCount attribute on the Con
nector.
如果遇到此問題,就要進行最佳化一下tomcat的接收資料容量,具體修改如下:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"
maxThreads="150" compression="on" executor="tomcatThreadPool" URIEncoding="utf-8"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"
noCompressionUserAgents="gozilla, traviata" compressionMinSize="50" maxParameterCount="1000000"/>
將這段內容替換掉tomcat->conf-->server.xml中一般是69,70,71行左右的<Connector .../>內容,重啟tomcat即可 。說明一下,maxParameterCount是起作用的內容,可根據需要自行加大,具體tomcat能接受的最大值是多少,這個還真沒考究過,不過一次100M資料量的提交應該是沒有問題的。
tomcat最佳化---大資料量提交tomcat時,tomcat無法接收導致頁面無反應