这两天在调试spring cloud feign+hystrix报了如下错误:
spring cloud provider报“Error parsing HTTP request header”,feign端报“Read timed out“
provider报错信息:
-- ::, [http-nio--exec-] DEBUG org.apache.coyote.http11.Http11Processor: - Error parsing HTTP request header
java.io.EOFException: null
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:)
at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:)
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:)
feign报错信息:
Exception in thread "pool-10-thread-14" feign.RetryableException: Read timed out executing
针对provider报错信息需要修改的配置如下:
server:
port:
tomcat:
max-http-header-size: --这里
针对feign端报错信息需要调整的配置如下:
feign:
client:
default:
#这里时间一定要调长,否则feign客户端会报ReadTimeOut 服务端报Error parsing HTTP request header
connectTimeout:
readTimeout:
loggerLevel: basic