spring cloud provider报“Error parsing HTTP request header”,feign端报“Read timed out“

Posted 一个逗逼

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring cloud provider报“Error parsing HTTP request header”,feign端报“Read timed out“相关的知识,希望对你有一定的参考价值。

这两天在调试spring cloud feign+hystrix报了如下错误:

spring cloud provider报“Error parsing HTTP request header”,feign端报“Read timed out“


provider报错信息:

2018-06-20 18:23:51,595 [http-nio-8086-exec-5] DEBUG org.apache.coyote.http11.Http11Processor:182 - Error parsing HTTP request header
java.io.EOFException: null
    at org.apache.tomcat.util.net.NioEndpoint$NiosocketWrapper.fillReadBuffer(NioEndpoint.java:1250)
    at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1190)
    at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:717)
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:366)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:687)

 

feign报错信息:

Exception in thread "pool-10-thread-14" feign.RetryableException: Read timed out executing 

 

 

针对provider报错信息需要修改的配置如下:

server:
  port: 8087
  tomcat:
      max-http-header-size: 3145728    --这里

 

 

针对feign端报错信息需要调整的配置如下:

feign:
  client:
    default:
      #这里时间一定要调长,否则feign客户端会报ReadTimeOut  服务端报Error parsing HTTP request header
      connectTimeout: 60000
      readTimeout: 60000
      loggerLevel: basic

 


以上是关于spring cloud provider报“Error parsing HTTP request header”,feign端报“Read timed out“的主要内容,如果未能解决你的问题,请参考以下文章

Spring Cloud使用

Docker下的Spring Cloud三部曲之二:细说Spring Cloud开发

Spring Cloud Gateway注册到服务器中心(Consul)

Spring Cloud配置Eureka 服务器

spring cloud - 1

spring cloud之坑,访问服务时找不到报404