Feign status 400 reading 问题分析
背景:项目使用的是微服务架构,采用springboot来开发,所有的服务都是基于内嵌tomcat来运行
问题:项目部署到测试环境之后,偶尔在后台日志会看到这样的日志:Feign status 400 reading XXXX content:
调查后发现是get请求参数太长的缘故,将参数打印出来,发现最长的有12KB,而内嵌tomcat对参数的默认限制是8K,在tomcat的org.apache.coyote.http11.AbstractHttp11Protocol类中定义了其默认值,如下:
/**
* Maximum size of the HTTP message header.
*/
private int maxHttpHeaderSize = 8 * 1024;
public int getMaxHttpHeaderSize() { return maxHttpHeaderSize; }
public void setMaxHttpHeaderSize(int valueI) { maxHttpHeaderSize = valueI; }
解决方案:
在Feign接口提供端的微服务中配置参数:
server:
max-http-header-size: 20480
Feign status 400 reading 问题分析的更多相关文章
- feign.FeignException: status 400 reading
feign.FeignException: status 400 reading : 请求方调用报错: 服务方被调用报错: 用fegin给redis设置缓存时报错,刚好 卡到8k这个临界点 ,就一直报 ...
- fegin client使用http url合约时报: [Request processing failed; nested exception is feign.FeignException: status 400 reading
首先看feign client代码: @FeignClient(name = "SPRING-CLOUD-WEB-PROVIDER-GROUP2", url = "htt ...
- SpringCloud使用Feign调用其他客户端带参数的接口,传入参数为null或报错status 405 reading IndexService#del(Integer);
SpringCloud使用Feign调用其他客户端带参数的接口,传入参数为null或报错status 405 reading IndexService#del(Integer); 第一种方法: 如果你 ...
- spring cloud feign 报错 feign.FeignException$MethodNotAllowed: status 405 reading 解决
1.前言 出现报错 feign.FeignException$MethodNotAllowed: status 405 reading XXXXX 需要检查 接口的请求参数是否一致 请求参数是否正确添 ...
- status 404 reading EduClient#getCourseInfoOrder(String)解决过程
UcenterClient#getUserInfoOrder(String) failed and no fallback available.解决过程 报错内容: com.netflix.hystr ...
- HTTP Status 400 - Required String parameter 'userName' is not present 错误
HTTP Status 400 - Required String parameter 'userName' is not present 错误 先mark 有时间详细写 参考链接: https:/ ...
- http status 400,http 400,400 错误
转载:http://blog.csdn.net/xu_zh_h/article/details/2294233 4 请求失败4xx 4xx应答定义了特定服务器响应的请求失败的情况.客户端不应当在不更改 ...
- SpringMVC格式转化错误之HTTP Status [400] – [Bad Request]
SpringMVC中,如果直接为Date类型的属性赋值,服务器有可能会报HTTP Status [400] – [Bad Request] Type Status Report Description ...
- HTTP Status 400 - description The request sent by the client was syntactically incorrect.
HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...
随机推荐
- python基本数据类型之字符串(一)
python中字符串中有很多方法,具体方法如下图所示: 分割方法 字符串的分割方法: 1.join方法: join方法是字符串方法中最重要的方法之一,它的作用是将某一字符插入到字符串中用作连接. 具体 ...
- css3 box-sizing详解。
人们慢慢的意识到传统的盒子模型不直接,所以他们新增了一个叫做 box-sizing 的CSS属性. box-sizing: 盒大小,盒模型. 我们经常遇到左右模块宽度为50%,加个边框会掉下去,加一个 ...
- java基础-day8
第08天 常用API 今日内容介绍 u API概述 u Scanner类与String类 u StringBuilder类 第1章 API概述 1.1 API概念 API(Applica ...
- Hdu1796 How many integers can you find 2017-06-27 15:54 25人阅读 评论(0) 收藏
How many integers can you find Time Limit : 12000/5000ms (Java/Other) Memory Limit : 65536/32768K ...
- 万能头文件#include <bits/stdc++.h>
最近在做题的时候看到别人的题解发现别人都用这个 突然之间打开新世界的大门 去百度之后才知道#include <bits/stdc++.h>包含了目前所有的c++头文件 也就是说只要用#in ...
- html5 定位
需要实现的功能:移动端的网页,能定位到中文地址. 百度地图能实现这样的功能. 之前精度差得原因是,我用自己的mac做服务器,用手机来浏览定位,这样只能定位到mac 的地址,mac上浏览器的地址就没准了 ...
- uva10905同一思路的两种做法,前一种WA,后一种AC
这道题应该算一道普通的排序吧,实际上就是另一种形式地比大小,自己最开始是用int型存,后来觉着不行,改用long,结果还是WA,这是第一个程序. 第二个程序是改用string处理,确实比int方便很多 ...
- 通过端口号查找进程号并杀掉进程window和Linux版本
window版本: cmd下执行: 1.查找某端口号下的进程: netstat -ano|findstr 8080 如果该端口号存在进程,执行完命令后会出现列表,最后一列的数字表示该端口号下的进程号 ...
- Java学习--循环语句
1. break public class BreakDemo{ // 完成一个四则运算的功能 public static void main(String args[]){ for(int i=0; ...
- 转:iOS9的新特性以及适配方案
2015年9月8日,苹果宣布iOS 9操作系统的正式版在太平洋时间9月16日正式推出,北京时间9月17日凌晨1点推送. 新的iOS 9系统比iOS8更稳定,功能更全面,而且还更加开放.iOS 9加入了 ...