tomcat 启动报错 Invalid character found in method name. HTTP method names must be tokens

时间:2024-10-31 13:06:20

解决:Invalid character found in method name. HTTP method names must be tokens

 

tomcat 启动报错 Invalid character found in method name. HTTP method names must be tokens

阿里云上弄了一个tomcat,经常半夜发送崩溃,查看日志发现这个东西,查阅资料发现是Tomcat的header缓冲区大小不够,只需要在server.xml中增加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"/>