13.8 java.lang.IllegalArgumentException: Request header is too large
来源:互联网 发布:联想有windows系统平板 编辑:程序博客网 时间:2024/06/06 04:15
13.8 java.lang.IllegalArgumentException: Request header is too large
问题日志:java.lang.IllegalArgumentException: Request header is too large
java.lang.IllegalArgumentException: Request header is too large at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:701) at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:455) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 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)
解决方案
配置 tomcat server xml
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxHttpHeaderSize="65536" maxPostSize="4194304" URIEncoding="UTF-8"/>
原因分析:
在tomcat的org.apache.coyote.http11.AbstractHttp11Protocol类中定义了其默认值:
/** * Maximum size of the HTTP message header. */ private int maxHttpHeaderSize = 8 * 1024;
所以,当请求头大于 8 * 1024,就会报错。针对这样的大数据量的请求,需要单独配置这个maxHttpHeaderSize的值。
解决方案
在application.properties里面配置一下maxHttpHeaderSize的值:
server.max-http-header-size=1048576# Maximum number of connections that the server will accept and process at any given time.server.tomcat.max-connections= 3000# Maximum size in bytes of the HTTP post content.server.tomcat.max-http-post-size=1048576# Maximum amount of worker threads.server.tomcat.max-threads=1000
参考:
http://tomcat.apache.org/tomcat-8.0-doc/config/ajp.html
阅读全文
0 0
- 13.8 java.lang.IllegalArgumentException: Request header is too large
- java.lang.IllegalArgumentException: Request header is too large
- java.lang.IllegalArgumentException: Request header is too large的解决方法
- java.lang.IllegalArgumentException: Request header is too large的解决
- java.lang.IllegalArgumentException: Request header is too large
- 《Springboot开发问题纪要》java.lang.IllegalArgumentException: Request header is too large
- Request header is too large
- Tomcat:Request header is too large
- java.lang.IllegalArgumentException: KeyValue size too large
- http post request header is too large 问题
- http post request header is too large 解决方案
- hbase插入数据时,报错java.lang.IllegalArgumentException: KeyValue size too large
- 向Hbase插入时,报错java.lang.IllegalArgumentException: KeyValue size too large的解决办法
- Glassfish Request URI is too large 问题的解决
- [错误]java.lang.IllegalArgumentException: Index for header 'XXX' is 1 but CSVRecord only has 1 val
- HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException:
- 400错误 request header or cookie too large 修改nginx.conf 增加缓冲区
- 413 Request Entity Too Large
- 13.2 Spring Boot启动报错:Whitelabel Error Page
- 13.5 SpringBoot应用启动错误org.apache.catalina.LifecycleException
- 13.6 SpringBoot集成Mongodb开发问题@EnableMongoRepositories路径配置
- 微信分布式数据存储协议对比——Paxos和Quorum
- 13.7 SpringBoot集成日志系统logback的几个问题
- 13.8 java.lang.IllegalArgumentException: Request header is too large
- the suspect
- 13.10 Scala中使用JSON.toJSONString报错:ambiguous reference to overloaded definition
- Python eval 函数妙用(转)
- 13.9 SpringBoot集成Swagger2中遇到的问题
- 13.4 库依赖冲突问题:Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path
- 润乾报表v5如何升级设计器的JDK版本
- 13.11 Scala混用Java的集合类调用scala的foreach遍历问题
- OSG的几个矩阵