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

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 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题