-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Gitea keeps on filling /tmp with indexes #31792
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
Comments
The tmp directory will be used in many operations. There is already a env variable |
I personally don't recall this being the case in the past though (I have also been facing this issues on |
IIRC, this hasn't always been the case. I have been contacted by some users that the Gitea instance was sluggish, upon investigation it turned out that this was due to a full The
Thank you kindly for your feedback. This takes some of the doubts away that I was having (whether it wasn't just PEBCAK). Do you experience this on OpenBSD - or on a different OS? |
yeah, I think I would have noticed, been using Gitea for some time now, too.
I concur, making this configurable would be preferable. I can imagine a decision to speed up the indexer was made at some point, which moved its files to /tmp, since it's mostly ramfs these days.
and I am equally glad you opened this issue, because I was having these doubts myself, since I don't get to spend as much time tuning my instance as I used to. I haven't mentioned this, sorry; I have been running Gitea on Arch (a Linux distro), but I'd expect this behaviour to be largely similar among OSs at least in that it uses system's temp folder. |
|
From diving somewhat further, it seems the problem is that
This was only tested on OpenBSD and fixed the behaviour we were seeing. Setting the |
|
We have this problem here (git.ardour.org). And it's not a "small" problem. Two days ago our server stopped functioning because nearly 10GB of the root partition was filled by gitea's "index[0-9]+" files. |
Do you think an optional temp directory could resolve your problem? If that, you can set a special temp dir with env variable |
We have a cron job that runs every night to remove these files, so for the most part, the problem is under control. Periodically, however, and for reasons that are not obvious, gitea runs amok and generates far more of them than "normal" Frankly, using 10GB of space on the server no matter it lives is not really acceptable. |
I think so. We are investigating the problem. Something may not be cleaned correctly. |
So for example, since my last comment, when I ran the "cleaner" by hand, gitea has generated another 11918 files. |
What's the temp files/directories looks like? All are |
Yes, every one of them. And since my last remark, 19619 files ... :) |
It's wired that those index directories should be cleaned up after use except Gitea exited abnormally. |
An additional 23k files since we last talked :) |
Do you have any error logs? |
Not sure where to look, and am headed to bed now. If you give me a pointer, I have a suspicion this situation will be continuing when I get up ... |
As an additional note, we've disabled indexing in the past to try to prevent his, and it is not working at least in the sense that these files are being produced anyway. |
How did you disable |
Yes, sorry, directories. And yes, they all have .tmp-index. Disabling indexing was done by putting this in app.ini: [indexer] |
They are two different features. I will send a PR like what #31792 (comment) posted, but I really don't know how it works. And before that, could you try to upgrade to v1.22.3? |
Try to fix #31792 Credit to @jeroenlaylo Copied from #31792 (comment) --------- Co-authored-by: wxiaoguang <[email protected]>
Try to fix #31792 Credit to @jeroenlaylo Copied from go-gitea/gitea#31792 (comment) --------- Co-authored-by: wxiaoguang <[email protected]> (cherry picked from commit feca8802b85dd75090c533ebdb92835d3d529f17)
Try to fix go-gitea#31792 Credit to @jeroenlaylo Copied from go-gitea#31792 (comment) --------- Co-authored-by: wxiaoguang <[email protected]>
Try to fix go-gitea#31792 Credit to @jeroenlaylo Copied from go-gitea#31792 (comment) --------- Co-authored-by: wxiaoguang <[email protected]>
Backport #32360 Try to fix #31792 Credit to @jeroenlaylo Copied from #31792 (comment) Co-authored-by: wxiaoguang <[email protected]>
Description
We are running Gitea (
1.22.1
) on OpenBSD (7.5-current
onamd64
). For some reason, Gitea keeps writing index files to/tmp
, despite having configured different paths in the Gitea config. Since this partition is 3GB, it fills up rather quickly.What causes this behaviour? Is there a configuration option that we are missing? If it possible to have Gitea use a custom path for these temporary indexes?
Our config:
Gitea Version
1.22.1
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
We are using the OpenBSD package
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: