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

Why the memory usage keeps slowly fluctuating and increasing #4184

Open
zhjdhx opened this issue Jun 11, 2024 · 3 comments
Open

Why the memory usage keeps slowly fluctuating and increasing #4184

zhjdhx opened this issue Jun 11, 2024 · 3 comments

Comments

@zhjdhx
Copy link

zhjdhx commented Jun 11, 2024

When I use go-zero, I added a route "ok". After starting the service, even without any client requests, the memory usage keeps slowly fluctuating and increasing. After approximately a day, it continues to fluctuate but no longer increases. What could be the reason for this? When using gin, there is almost no fluctuation in memory usage.

@kevwan
Copy link
Contributor

kevwan commented Jun 11, 2024

I recommend you to do a memory profiling. And upload the file if no sensitive info.

Right now, I have no idea on this. We didn't have this kind of issue.

@zhjdhx
Copy link
Author

zhjdhx commented Jun 14, 2024

Okay, let me reproduce and capture the pprof. Expected to provide next week

@zhjdhx
Copy link
Author

zhjdhx commented Jun 18, 2024

test code is https://github.com/zeromicro/zero-examples.git zero-examples/http/demo
rss is grow 5kb after one day whithout any request:

root 40203 0.1 1.0 1685272 20624 pts/0 SNl 16:26 0:00 ./demo some minutes after start
root 40203 0.1 1.1 1759324 21656 pts/0 SNl 16:26 0:00 ./demo some minutes after start by pprof
root 40203 0.1 1.3 1759580 26880 pts/0 SNl Jun17 1:05 ./demo one day after after start
root 40203 0.1 1.3 1759580 26084 pts/0 SNl Jun17 1:05 ./demo one day after after start by pprof

the go-zero pprof file is in https://f.ws59.cn/f/edu6fambotp 24h valid

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

2 participants