码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat server 报错之 More than the maximum allowed number of cookies

时间:2017-06-16 16:51:39      阅读:765      评论:0      收藏:0      [点我收藏+]

标签:apach   允许   ror   ada   end   more   cookies   ogg   catalina   

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

标签:apach   允许   ror   ada   end   more   cookies   ogg   catalina   

原文地址:http://www.cnblogs.com/gsyun/p/7027691.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!