Gitea going out of memory and crashing after uploading a large file. #8776

Closed
opened 2025-11-02 08:17:24 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @991jo on GitHub (Apr 1, 2022).

Description

I recently pushed a ~800MB large file to my gitea instance.
Then my gitea started crashing with a "out of memory" issue. (That was with a VM with 2GB RAM and nothing else except the basic linux daemons like ssh, etc).
The crash happens a couple seconds after startup.

Because the error continuously crashes my system I decided not to try this on other instances.

I upgraded the RAM of my VM from 2GB to 4GB. This "fixes" the issue. Now my gitea instance that is serving half a dozen very low activity repositories sits at over 3GB of RAM. (Before pushing that file the instance was running fine with 1GB which I had increased to increase to 2GB because git itself went out of memory while pushing the 800MB file).

I am not using LFS at the moment.

If you need any further logs/details let me know. It might take some time, because the instance is in production and I have to adjust the amount of RAM for that VM to reproduce the issue.

Gitea Version

1.13.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/991jo/dae6efccfd944b6a413cacbff2338b7c

Screenshots

No response

Git Version

2.20.1

Operating System

Debian 10

How are you running Gitea?

Gitea is installed via the precompiled package and run via systemd.

Database

SQLite

Originally created by @991jo on GitHub (Apr 1, 2022). ### Description I recently pushed a ~800MB large file to my gitea instance. Then my gitea started crashing with a "out of memory" issue. (That was with a VM with 2GB RAM and nothing else except the basic linux daemons like ssh, etc). The crash happens a couple seconds after startup. Because the error continuously crashes my system I decided not to try this on other instances. I upgraded the RAM of my VM from 2GB to 4GB. This "fixes" the issue. Now my gitea instance that is serving half a dozen very low activity repositories sits at over 3GB of RAM. (Before pushing that file the instance was running fine with 1GB which I had increased to increase to 2GB because git itself went out of memory while pushing the 800MB file). I am not using LFS at the moment. If you need any further logs/details let me know. It might take some time, because the instance is in production and I have to adjust the amount of RAM for that VM to reproduce the issue. ### Gitea Version 1.13.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/991jo/dae6efccfd944b6a413cacbff2338b7c ### Screenshots _No response_ ### Git Version 2.20.1 ### Operating System Debian 10 ### How are you running Gitea? Gitea is installed via the precompiled package and run via systemd. ### Database SQLite
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:17:24 -06:00
Author
Owner

@lunny commented on GitHub (Apr 1, 2022):

Please upgrade to recent stable version and try it again.

@lunny commented on GitHub (Apr 1, 2022): Please upgrade to recent stable version and try it again.
Author
Owner

@991jo commented on GitHub (Apr 3, 2022):

Okay, I upgraded to 1.16.5 and the problem appears to be fixed. The idle memory usage is <200MB.
(Note: The upgrade went smoothly, I simply swapped the binary and everything just worked out of the box. Thanks for that. 👍 )

I guess this can be closed.

@991jo commented on GitHub (Apr 3, 2022): Okay, I upgraded to 1.16.5 and the problem appears to be fixed. The idle memory usage is <200MB. (Note: The upgrade went smoothly, I simply swapped the binary and everything just worked out of the box. Thanks for that. :+1: ) I guess this can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8776