首页 > 代码库 > 解决:Invalid character found in method name. HTTP method names must be tokens
解决:Invalid character found in method name. HTTP method names must be tokens
阿里云上弄了一个tomcat,经常半夜发送崩溃,查看日志发现这个东西,查阅资料发现是Tomcat的header缓冲区大小不够,只需要在server.xml中增加maxHttpHeaderSize字段即可:
<Connector URIEncoding="UTF-8" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" useBodyEncodingForURI="false" enableLookups="false" connectionTimeout="20000" redirectPort="8443" maxHttpHeaderSize="你想要的大小"/>
如:
<Connector port="8080" executor="tomcatThreadPool"
protocol="HTTP/1.1"
maxThreads="1000"
maxHttpHeaderSize="8192"
minSpareThreads="100"
maxSpareThreads="200"
acceptCount="1000"
maxConnections="1000"
connectionTimeout="30000"
keepAliveTimeout="15000"
maxKeepAliveRequests="1"
tcpNoDelay="true"
redirectPort="8443"
enableLookups="false"
URIEncoding="UTF-8"/>
解决:Invalid character found in method name. HTTP method names must be tokens
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。