Thrift接口
线上新建任务失败,查询任务死慢
查询慢:中间进行了不必要的数据库查询,客户端连接超时关闭连接,服务端发送数据失败
解决:去掉不必要的数据库查询,增大客户端的超时时间
新建任务失败:Thrift线程池全用在了查询,导致没有线程去处理新建,导致失败
解决:扩大Thrift线程池的数量
Thrift反序列化异常
协议不对,导致连接异常,端口被攻击OOM,可以配置OOM自动执行脚本重启
配置被多次改变
没有用项目resource目录下的配置文件
第一次:maven中指定profile
第二次:在启动脚本中,重新引入配置文件,覆盖jar包默认的配置文件
export CLASSPATH=$APP_HOME/config:$CLSPATH
ssh不能跳转
权限不对,得改成755,775是跳转不过去的
replace into select
当数据超过1w,具体是几w没有测试,在mybatis中执行这个语句不管用,既没有插入进入,也不会报错
是因为2个表中,一个表的字段长度为200,另一个为100,导致有些长度超过100的数据就插入不进去,又因为在线程中,所以没有抛出异常
调用接口失败
Kafka并发数越大,失败次数越多,错误是拒绝连接,以为是Thrift最大线程数不够,结果是其中一个服务崩掉后,haproxy还会转发过去,导致一直报错,将报错节点启动后,正常访问
haproxy配置文件没有配置好
server后面的内容有一部分是一样的,导致后面增加的节点数不管用,name一定不能一样
listen bl_sentiments_60000
bind 192.168.12.11:60000
mode tcp
balance roundrobin
option tcplog
option abortonclose
option forwardfor except 127.0.0.0/8
maxconn 51200
server nlp01 192.168.12.11:60001 check inter 2000 rise 2 fall 3
server nlp02 192.168.12.11:60002 check inter 2000 rise 2 fall 3
server nlp03 192.168.12.11:60003 check inter 2000 rise 2 fall 3
server nlp01 192.168.12.11:60004 check inter 2000 rise 2 fall 3
server nlp02 192.168.12.11:60005 check inter 2000 rise 2 fall 3
server nlp03 192.168.12.11:60006 check inter 2000 rise 2 fall 3
配置多数据源
多数据源老是报空指针,多数据源没有配置对,导致里面存的映射关系还是另一个数据源的映射关系
当mybatis没有映射对的时候
执行的时候才去找相应的方法
public SqlCommand(Configuration configuration, Class<?> mapperInterface, Method method) {
final String methodName = method.getName();
final Class<?> declaringClass = method.getDeclaringClass();
MappedStatement ms = resolveMappedStatement(mapperInterface, methodName, declaringClass,
configuration);
if (ms == null) {
if (method.getAnnotation(Flush.class) != null) {
name = null;
type = SqlCommandType.FLUSH;
} else {
// 这里报出异常
throw new BindingException("Invalid bound statement (not found): "
+ mapperInterface.getName() + "." + methodName);
}
} else {
name = ms.getId();
type = ms.getSqlCommandType();
if (type == SqlCommandType.UNKNOWN) {
throw new BindingException("Unknown execution method for: " + name);
}
}
}
RocketMQ
消费的时候调用RPC接口超时(没有设置超时时间),一直流控
中间件导致的oom
连接池超过
负载均衡策略有问题,测试环境调用到开发环境的接口
@Reference注入为空
dubbo反序列化为map
雪花算法workId重复,超过限制
多数源没有扫进去,导致mybatis执行失败
静态变量赋值失败,导致NoClassDefFoundError
延迟初始化,导致ApplicationContextAware注入容器失败
用了悲观锁,但是外面没有再次判断
rabbitmq消费消息失败,导致不断重试