方案一:

重启dubbo连接 zookeeper

方案二:

经压测,greys跟踪得知,是dubbo的monitor的问题。主要超时的方法是dubbo的getIP方法,monitor每次收集数据的时候都要根据域名获取zk的IP,这一步耗时很长。

    public String getIp() {
if (ip == null) {
ip = NetUtils.getIpByHost(host);
}
return ip;
}

现在改了dubbo的源码,monitor每次收集数据的时候不获取zk的ip,直接用域名。增加如下方法,

    public String toServiceString(boolean useIP){
return buildString(true, false, useIP, true);
}

修改AbstractMonitorFactory的方法

    public Monitor getMonitor(URL url) {
url = url.setPath(MonitorService.class.getName()).addParameter(Constants.INTERFACE_KEY, MonitorService.class.getName());
String key = url.toServiceString(false);
LOCK.lock();
try {
Monitor monitor = MONITORS.get(key);
if (monitor != null) {
return monitor;
}
monitor = createMonitor(url);
if (monitor == null) {
throw new IllegalStateException("Can not create monitor " + url);
}
MONITORS.put(key, monitor);
return monitor;
} finally {
// 释放锁
LOCK.unlock();
}
}

Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2016-07-20 16:27:34.873, end time: 2016-07-20 16:27:39.895, client elapsed: 0 ms的更多相关文章

  1. 关于dubbo服务产生异常之:Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer.

    简单来说就是dubbo超时,因为dubbo默认的时间是500ms,超过这个时间它会重新访问service层,最多尝试三次. 所以我在测试的时候日志显示出来的异常为……timeout……. 开始设置开始 ...

  2. dubbo 响应超时异常: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout.

    因为dubbo默认的时间是500ms,超过这个时间它会重新请求服务层,最多尝试三次. 如果数据量比较大就不行了显示出来的异常为timeout. 在服务提供端设置timeout=1200000 并且加了 ...

  3. dubbo报com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout. start time: 2020-03-28 23:08:50.342, end time: 2020-03-28 23:08:51.344,

    当进行debug 启动项目报 dubbo remotiong timeout ,默认1一秒,要在spring配置文件中,dubbo配置中dubbo:service配置timeout属性,如下图配置10 ...

  4. com.alibaba.dubbo.remoting.TimeoutException

    maven项目 update clean install 重启 服务消费者

  5. org/apache/curator/RetryPolicy at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.connect(CuratorZookeeperTransporter.java:26)

    使用dubbo服务,启动项目报错: org/apache/curator/RetryPolicy at com.alibaba.dubbo.remoting.zookeeper.curator.Cur ...

  6. com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.1.13:20881, cause: Failed to bind to: /0.0.0.0:20881

    抛出的异常如上,解决方案是:根据异常信息确定是端口被占用,排查项目是否启动之后没有关闭,在windows命令行中运行如下命令:netstat -ano 检查端口占用的情况,根据pid在任务管理器中杀死 ...

  7. 报错 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException的解决放案

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/loveliness_peri/artic ...

  8. [TODO]com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method

    异常信息如下: 2018-10-30 20:00:50.230 ERROR java.util.concurrent.ExecutionException: com.alibaba.dubbo.rpc ...

  9. com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method解决方法

    报错日记: Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: getUserAuthLeve ...

随机推荐

  1. bzoj 4242 水壶 (多源最短路+最小生成树+启发式合并)

    4242: 水壶 Time Limit: 50 Sec  Memory Limit: 512 MBSubmit: 1028  Solved: 261[Submit][Status][Discuss] ...

  2. bzoj 2460 拟阵+判线性相关

    /************************************************************** Problem: 2460 User: idy002 Language: ...

  3. ASP.NET 构建高性能网站 第3篇

    HTTP请求的优化 在一个网页的请求过程中,其实整个页面的html结构(就是页面的那些html骨架)请求的时间是很短的,一般是占整个页面的请求时间的10%-20%.在页面加载的其余的时间实际上就是在加 ...

  4. ROS知识(8)----CMakeLists.txt文件编写的理解

    ROS(Indigo)编程必须要理解CMakeList.txt的编写规则,教程地址:catkin/CMakeLists.txt,官网有相关的教程,中文的翻译版本写的很不错,教程地址:ROS中的CMak ...

  5. POJ 1330 Nearest Common Ancestors (LCA,dfs+ST在线算法)

    Nearest Common Ancestors Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 14902   Accept ...

  6. spring mvc 如何传递集合参数(list,数组)

    spring mvc 可以自动的帮你封装参数成为对象,不用自己手动的通过request一个一个的获取参数,但是这样自动的参数封装碰碰到了集合参数可能就需要点小技巧才可以了. 一.基础类型和引用类型有什 ...

  7. Android4.2.2启动动画前播放视频

    首先声明測试平台为瑞芯微的rk3168,Android4.2.2,Android版本号非常重要,由于Android4.0和Android4.2.2的代码有些地方就有差别,并不通用! 首先接到任务不知怎 ...

  8. FT项目开发技术点(二)

    1.mybatis二级缓存,指的的是将数据缓存,而非对象,而非获得的list.缓存将数据库中的数据,是数据,缓存到内存中.之后将数据每次重新加载到list中,所以每次生成的list对象都是不同的,li ...

  9. 使用stream(流)实现多表数据传输

    使用stream(流)实现多表数据传输 几乎所有的TCP和HTTP通信控件都支持stream(流)的传输. 使用stream(流)是可以实现多表数据传输的. 但这需要自定义协议了: 合并后的strea ...

  10. 将数据处理逻辑集中到一处进行管理,逐步实现真正有效的 MVC 分层结构

    将数据处理逻辑集中到一处进行管理,逐步实现真正有效的 MVC 分层结构.