yuKj 2016-12-20 11:55 采纳率: 0%
浏览 8375

zookeeper 注册接口速度很慢。每一个接口越5秒,请教

首先是平台为macOS 10.12

ide为eclipse,项目搭载到tomcat7.0
项目为java-web

zookeeper使用为 3.4.6 (尝试过最新3.5.2)
zoo.cfg配置为

The number of milliseconds of each tick
tickTime=2000
The number of ticks that the initial
synchronization phase can take
initLimit=10
The number of ticks that can pass between
sending a request and getting an acknowledgement
syncLimit=5
the directory where the snapshot is stored.
do not use /tmp for storage, /tmp here is just
example sakes.
dataDir=/Users/yukaiji/Documents/tmp/ttehui
the port at which the clients will connect
clientPort=2181
the maximum number of client connections.
increase this if you need to handle more clients
maxClientCnxns=60

Be sure to read the maintenance section of the
administrator guide before turning on autopurge.

http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance

The number of snapshots to retain in dataDir
autopurge.snapRetainCount=3
Purge task interval in hours
Set to "0" to disable auto purge feature
autopurge.purgeInterval=1

hosts 设置为本机 ip 本机名称
zkSever.sh. 启动正常。 日志文件 无错误,jps查看端口正常。
zkCli.sh. 启动 约 5 秒
目前认为是重点,配置文件反复看了很多次了。 2181 端口正常
启动java-web项目,在注册dubbo接口(managerService)的时候,一个大约5秒钟。
图片说明
在win环境下 启动项目整体约30秒,现在启动是两分钟多点。排查了一天半,不清楚因为什么。
日志信息就是在dubbo接口注册的时候非常慢。
这里还有个问题需要请教,每一个接口的注册,都需要重新连接zookeeper吗?因为每一个接口间隔5s 很均匀。

在这里向各位请教。不胜感激。新入门没有币

  • 写回答

7条回答 默认 最新

  • yuKj 2016-12-20 13:41
    关注

    还请各位帮忙提点一下。万分感谢。我在百度没有找到相关问题。
    明天会把日志贴出来。(配置文件和日志已经看烂)

    整个项目在运行时,只有dubbo的service接口注册的时候很慢,每5秒钟一条。

    万分感谢!

    评论

报告相同问题?

悬赏问题

  • ¥15 vue2(标签-chrome|关键词-浏览器兼容)
  • ¥15 python网络流自动生成系统 医学领域
  • ¥15 sql查询仓库里都有什么
  • ¥15 代码的修改,添加和运行完善
  • ¥15 krpano-场景分组和自定义地图分组
  • ¥15 lammps Gpu加速出错
  • ¥15 关于PLUS模型中kapaa值的问题
  • ¥15 关于博途V17进行仿真时无法建立连接问题
  • ¥15 机器学习教材中的例题询问
  • ¥15 求.net core 几款免费的pdf编辑器