tomcat server 报错之 More than the maximum allowed number of cookies
Posted 彩虹天堂
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat server 报错之 More than the maximum allowed number of cookies相关的知识,希望对你有一定的参考价值。
More than the maximum allowed number of cookies
EVERE: Error processing request
java.lang.IllegalArgumentException: More than the maximum allowed number of cookies, [200], were detected.
at org.apache.tomcat.util.http.Cookies.addCookie(Cookies.java:132)
at org.apache.tomcat.util.http.Cookies.processCookieHeader(Cookies.java:501)
at org.apache.tomcat.util.http.Cookies.processCookies(Cookies.java:195)
at org.apache.tomcat.util.http.Cookies.getCookieCount(Cookies.java:119)
at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:1077)
at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:784)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:437)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
故,修改配置,添加maxHttpHeaderSize="65536" maxPostSize="4194304"
Request header is too large
INFO: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Request header is too large
at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:512)
at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501)
at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:171)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:996)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722
因为tomcat的默认cookies允许的数量默认为200,超出200后就会报该错误,修改为 2000
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" maxHttpHeaderSize="65536" maxPostSize="4194304" maxCookieCount="2000" />
以上是关于tomcat server 报错之 More than the maximum allowed number of cookies的主要内容,如果未能解决你的问题,请参考以下文章
ALERT日志中常见监听相关报错之二:ORA-3136错误的排查