go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

etcd error with required revision has been compacted

Open loop321 opened this issue 2 years ago • 3 comments

go-zero version: v1.4.4 etcd version: v3.4.14 When go-zero's RPC is called, it consumes a lot of memory and the program reports the following error: {"@timestamp":"2023-06-20T10:37:47.022+08:00","caller":"internal/registry.go:314","content":"etcd monitor chan has been canceled, error: etcdserver: mvcc: required revision has been compacted","level":"error"}

How should solve this problem? thinks!

loop321 avatar Jun 20 '23 03:06 loop321

This is an issue with Etcd. Please check https://github.com/etcd-io/etcd/issues/10450

re-dylan avatar Jun 21 '23 15:06 re-dylan

@re-dylan Thank you, we will optimize the configuration of etcd first and observe for a while. In addition, when the error occurs, it may cause an infinite loop and memory leak , Apart from the problem with etcd, it may be related to this code segment: discov/internal/registry.go:

for {
    if c.watchStream(cli, key, rev) {
        return
    }
}

loop321 avatar Jun 25 '23 03:06 loop321

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 29 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Sep 30 '24 02:09 github-actions[bot]