Library constantly increases memory usage in long-running applications #959
Labels
No Label
bug
duplicate
enhancement
invalid
question
up for grabs
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: jcarr/git2go#959
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
I observed in one long-running application that if the application uses the git2go library to clone the repo or compute the last commit hash from branch/tag then memory is constantly increasing. We run our application in Kubernetes so it leads the pod to
out of memory
error.I prepared the
hello world
application that can easily reproduce the problem. The application clones the repo in the infinite loop and after that, it will remove the tmp directory and run theFree
method on every git2go object:The app can be built by running
docker build -t <tag> .
on this Dockerfile (or you can simply reuse my imagepprecel/git2go:latest
):The application can be run in every container ecosystem, so docker or Kubernetes systems will show the right results:
or
On my machine, I observed that after a night the memory usage increased from 28Mi to almost 3000Mi and it's still increasing.
. Example:
after a night
The output from the
ContainerWatch
extension: