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

leveldb.openFile("path",nil),memory keep increase #353

Open
edisonyangyang opened this issue Mar 4, 2021 · 0 comments
Open

leveldb.openFile("path",nil),memory keep increase #353

edisonyangyang opened this issue Mar 4, 2021 · 0 comments

Comments

@edisonyangyang
Copy link

my test code
/~
func main() {
Dir := "./blockdb"
blockdb, err := leveldb.OpenFile(Dir, nil)
if err != nil {
fmt.Println("open blockchain db error:", err)
os.Exit(1)
}
defer blockdb.Close()

Router()

}

func Router() {
r := gin.Default()
pprof.Register(r)
r.Run(":8218")
}

~/
go tool pprof --alloc_space http://localhost:8218/debug/pprof/heap
2.53GB 99.83% 99.83% 2.53GB 99.83% github.com/syndtr/goleveldb/leveldb/util.(*BufferPool).Get

//
and after a while, the program is killed by system.

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