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 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的