Increased memory and CPU usage on 1.23.4 #14224

Closed
opened 2025-11-02 11:06:55 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @maxim-mityutko on GitHub (Mar 5, 2025).

Description

I'm observing significant increase in memory and CPU usage by Gitea after upgrading official chart from 10.6.0 (gitea: 1.22.3) to 11.0.0 (gitea: 1.23.4).

The instance is private and I am the only user, it is not exposed to the internet. Basically it is used to sync tabs and bookmarks from the Floccus extension. After the upgrade I had to increase memory limits from 250Mi to 400Mi to avoid OOM exceptions.

Here is my conf and the diagnostics report gitea-diagnosis-20250305-225737.zip

Gitea Version

1.23.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Image

Image

Git Version

No response

Operating System

No response

How are you running Gitea?

Running on microk8s cluster.

Database

PostgreSQL

Originally created by @maxim-mityutko on GitHub (Mar 5, 2025). ### Description I'm observing significant increase in memory and CPU usage by Gitea after upgrading official chart from 10.6.0 (gitea: 1.22.3) to 11.0.0 (gitea: 1.23.4). The instance is private and I am the only user, it is not exposed to the internet. Basically it is used to sync tabs and bookmarks from the Floccus extension. After the upgrade I had to increase memory limits from 250Mi to 400Mi to avoid OOM exceptions. Here is my [conf](https://github.com/maxim-mityutko/home-infra/blob/2b14fc4b1839e9c26729826e751bc2c673c5b7e8/kubernetes/cluster/extras/gitea/kustomization.yaml#L20-L94) and the diagnostics report [gitea-diagnosis-20250305-225737.zip](https://github.com/user-attachments/files/19098017/gitea-diagnosis-20250305-225737.zip) ### Gitea Version 1.23.4 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![Image](https://github.com/user-attachments/assets/3747077a-6135-4040-b5c6-290c514011af) ![Image](https://github.com/user-attachments/assets/de76df8a-1a23-4598-88fc-7fac5bfc436e) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Running on microk8s cluster. ### Database PostgreSQL
GiteaMirror added the type/bugissue/needs-feedback labels 2025-11-02 11:06:55 -06:00
Author
Owner

@TheFox0x7 commented on GitHub (Mar 5, 2025):

It's a known issue - same root cause as https://github.com/go-gitea/gitea/issues/31956
The difference in allocated memory is the license classifier

@TheFox0x7 commented on GitHub (Mar 5, 2025): It's a known issue - same root cause as https://github.com/go-gitea/gitea/issues/31956 The difference in allocated memory is the license classifier
Author
Owner

@lunny commented on GitHub (Mar 5, 2025):

Maybe that feature could be disabled with an option.
ref: #33467

@lunny commented on GitHub (Mar 5, 2025): Maybe that feature could be disabled with an option. ref: #33467
Author
Owner

@ExplodingDragon commented on GitHub (Mar 6, 2025):

@maxim-mityutko 300Mi memory limit appears to be insufficient, as it may lead to Out of Memory (OOM) errors when pushing larger repositories or during git fsck operations. Additionally, while reviewing your kustomization.yaml file, I noticed that your secret is publicly exposed. If this contains actual production credentials, I strongly recommend replacing it immediately.

@ExplodingDragon commented on GitHub (Mar 6, 2025): @maxim-mityutko 300Mi memory limit appears to be insufficient, as it may lead to Out of Memory (OOM) errors when pushing larger repositories or during `git fsck` operations. Additionally, while reviewing your kustomization.yaml file, I noticed that your secret is [publicly exposed](https://github.com/maxim-mityutko/home-infra/blob/2b14fc4b1839e9c26729826e751bc2c673c5b7e8/kubernetes/cluster/extras/gitea/secret.yaml). If this contains actual production credentials, I strongly recommend replacing it immediately.
Author
Owner

@maxim-mityutko commented on GitHub (Mar 6, 2025):

@ExplodingDragon Thanks for pointing this out. It is indeed not enough with the current release of Gitea, and I actually bumped it to 400, but the change is not on main. However the point is that the Gitea's resource consumption went up and as others pointed out above, the reason for this is known.
Regarding the secrets, I use SealedSecrets to encrypt the actual secret. So no actual secret data is exposed. But thanks for mentioning it.

@maxim-mityutko commented on GitHub (Mar 6, 2025): @ExplodingDragon Thanks for pointing this out. It is indeed not enough with the current release of Gitea, and I actually bumped it to 400, but the change is not on `main`. However the point is that the Gitea's resource consumption went up and as others pointed out above, the reason for this is known. Regarding the secrets, I use [SealedSecrets](https://github.com/bitnami-labs/sealed-secrets) to encrypt the actual secret. So no actual secret data is exposed. But thanks for mentioning it.
Author
Owner

@wxiaoguang commented on GitHub (Mar 10, 2025):

The "license" memory usage should should have been fixed by Only keep popular licenses #33832 (in the current development branch "main" 1.24)

@wxiaoguang commented on GitHub (Mar 10, 2025): The "license" memory usage should should have been fixed by Only keep popular licenses #33832 (in the current development branch "main" 1.24) * https://dl.gitea.com/gitea/main-nightly/ * https://hub.docker.com/r/gitea/gitea/tags?name=nightly
Author
Owner

@maxim-mityutko commented on GitHub (Mar 10, 2025):

Seems to be under control. I'll let it run for now on a nightly build and check the resource usage again after some time.

Image

@maxim-mityutko commented on GitHub (Mar 10, 2025): Seems to be under control. I'll let it run for now on a nightly build and check the resource usage again after some time. ![Image](https://github.com/user-attachments/assets/6e0bf62f-5391-4b6c-93f6-296d1eb61caf)
Author
Owner

@maxim-mityutko commented on GitHub (Mar 12, 2025):

Memory usage looks good after a gew days. Thanks for the quick fix!

Image

@maxim-mityutko commented on GitHub (Mar 12, 2025): Memory usage looks good after a gew days. Thanks for the quick fix! ![Image](https://github.com/user-attachments/assets/825b7af0-cc42-4bf8-b83c-29473be19c9d)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14224