zoukankan      html  css  js  c++  java
  • 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"  />

     

  • 相关阅读:
    ZABBIX监控TCP连接状态
    MySQL索引(九)
    MySQL字符集、information_schema元数据(八)
    DML(数据库操作语言)(六)
    DDL(数据库定义语言)(五)
    MySQL多实例安装、配置、启动(四)
    CentOS7 编译安装MySQL5.6.38(一)
    MySQL权限管理、配置文件(三)
    MySQL服务的构成(二)
    yum lockfile is held by another process
  • 原文地址:https://www.cnblogs.com/gsyun/p/7027691.html
Copyright © 2011-2022 走看看