Coder Social home page Coder Social logo

goc profile耗时很长 about goc HOT 7 CLOSED

qiniu avatar qiniu commented on August 20, 2024
goc profile耗时很长

from goc.

Comments (7)

lxhao avatar lxhao commented on August 20, 2024

指定服务名字清理时,如果服务已经掉线了,也会报错

goc clear --service=xxx

{"error":"Post "http://172.16.71.81:8899/v1/cover/clear\": dial tcp 172.16.71.81:8899: connect: no route to host"}%

from goc.

lxhao avatar lxhao commented on August 20, 2024

服务端可以自动清理不在线的address吗

from goc.

CarlJi avatar CarlJi commented on August 20, 2024

当有很多服务注册在goc server上面,服务被销毁后,获取覆盖率文件耗时很长,如果不手动清理,注册的服务会越来越多,耗时也越来越长。 有参数可以设置跟客服端的请求超时不

这个是说遍历一遍服务消耗的时间很长?(PS: 是否尝试了这个命令 goc profile --force ?)

指定服务名字清理时,如果服务已经掉线了,也会报错

goc clear --service=xxx

{"error":"Post "[http://172.16.71.81:8899/v1/cover/clear](http://172.16.71.81:8899/v1/cover/clear%5C)": dial tcp 172.16.71.81:8899: connect: no route to host"}%

删除服务,用goc remove 命令

@lxhao

from goc.

CarlJi avatar CarlJi commented on August 20, 2024

服务端可以自动清理不在线的address吗

怎样的情况下才能判断服务"不在线"呢?我担心有误伤。

from goc.

Naisisor avatar Naisisor commented on August 20, 2024

服务端可以自动清理不在线的address吗

怎样的情况下才能判断服务"不在线"呢?我担心有误伤。

我也遇到了相同的问题,在容器实践过程中这是非常常见的问题,以下是我处理的方式

c.JSON(http.StatusExpectationFailed, gin.H{"error": fmt.Sprintf("failed to get profile from %s, error %s", addr, err.Error())})

在这行代码下面增加了一下的处理方式,并将 return 移除

err := s.Store.Remove(addr)
if err != nil {
    c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
    return
}
fmt.Fprintf(c.Writer, "Remove service %s from the center.\n", addr)

这样就可以在 goc profile 时自动移除报错的 service

from goc.

CarlJi avatar CarlJi commented on August 20, 2024

PR #163 当已经修复了这个问题,先关闭。

from goc.

HeartIsBeat avatar HeartIsBeat commented on August 20, 2024

PR #163 当已经修复了这个问题,先关闭。

我怎么觉得这个并没有修复问题呢?k8s部署的服务,无效的address越来越多
go watchSignal(fn) 根本没启作用,是我哪里用的不对?

from goc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.