Skip to content

Huge and always increasing memory  #6532

@Ailsa-Wu

Description

@Ailsa-Wu

Describe the bug

The memory of our gogs will keeping increasing. And then it will be killed because of OOM after few days.
We use it to store gitops repos and a little helm charts , so we will pull and push frequently. Our largest repo is about 22M and others are all about dozens of KB. Total size is smaller than 100M. I'm just guess that there is memory leak. We use it in production env., so it is really confused us. Any response or suggestion will be appreciated. Thx.

As the monitor graph shows, the memory increase day by day.
image

That's the statistic data on Gogs.
image

Gogs version and commit

v0.11.86.0130

Git version

$ git version

We use golang to push and pull git repo.
github.com/go-git/go-git/v5 v5.2.0

Operating system

GKE
Version: 1.18.12-gke.1210

Database

PostgreSQL 13 on GCP
GCP Cloud Filestore for local storage.
image

To Reproduce
Steps to reproduce the behavior:

Start Gogs and run about a fews days.

Can you reproduce the bug at https://try.gogs.io?

Expected behavior

Memory stabilizes on a reasonable value

Actual behavior

Always increase

Screenshots

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions