您的位置:首页 > 运维架构 > Tomcat

tomcat优化---大数据量提交tomcat时,tomcat无法接收导致页面无反应

2017-07-31 12:18 495 查看

关于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数据量的提交应该是没有问题的。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: