Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务启动后内存不断增加 #2722

Open
lovedachengzi opened this issue Jul 31, 2024 · 0 comments
Open

服务启动后内存不断增加 #2722

lovedachengzi opened this issue Jul 31, 2024 · 0 comments

Comments

@lovedachengzi
Copy link

Environment

  • Server: Dubbo-go, v3.1.1
  • Client: Dubbo-go, v3.1.1
  • Protocol: Triple
  • Registry: Nacos, v2.2.3

Issue description

在k8s中启动服务后发现内存在不断增加,使用pprof工具分析发现github.com/dubbogo/grpc-go/internal/transport.newBufWriter在不断申请内存

Logs

Click me to check logs
(pprof) top
Showing nodes accounting for 26335.78kB, 89.55% of 29409.22kB total
Showing top 10 nodes out of 85
      flat  flat%   sum%        cum   cum%
 8714.66kB 29.63% 29.63%  8714.66kB 29.63%  github.com/dubbogo/grpc-go/internal/transport.newBufWriter
 7625.84kB 25.93% 55.56%  7625.84kB 25.93%  golang.org/x/net/webdav.(*memFile).Write
 5809.83kB 19.76% 75.32%  5809.83kB 19.76%  bufio.NewReaderSize
 1024.44kB  3.48% 78.80%  1024.44kB  3.48%  runtime.malg
  574.34kB  1.95% 80.75%   574.34kB  1.95%  dubbo.apache.org/dubbo-go/v3/filter/accesslog.newFilter.func1
  521.37kB  1.77% 82.53%   521.37kB  1.77%  github.com/envoyproxy/go-control-plane/envoy/config/route/v3.init
  519.03kB  1.76% 84.29%   519.03kB  1.76%  github.com/dlclark/regexp2/syntax.init.func1
  516.64kB  1.76% 86.05%   516.64kB  1.76%  runtime.procresize
     515kB  1.75% 87.80%      515kB  1.75%  regexp.makeOnePass.func1
  514.63kB  1.75% 89.55%   514.63kB  1.75%  github.com/go-playground/validator/v10.map.init.7
(pprof) list github.com/dubbogo/grpc-go/internal/transport.newBufWriter
Total: 28.72MB
ROUTINE ======================== github.com/dubbogo/grpc-go/internal/transport.newBufWriter in /data/go/pkg/mod/github.com/dubbogo/[email protected]/internal/transport/http_util.go
    8.51MB     8.51MB (flat, cum) 29.63% of Total
 Error: open /data/go/pkg/mod/github.com/dubbogo/[email protected]/internal/transport/http_util.go: no such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant