-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Gitea growing memory usage when unused #753
Comments
Do you have the same issue with another Database backend ? |
Very good question, will try and check that and come back. |
That pretty much looks like a memory leak. Would be interesting to start debugging with pprof, but one would have to include that themselves IIRC. |
OK the problem seems to have been that I was just naively using the default configuration of sessions in the gitea.ini from the image gitea/gitea@sha256:dd2212f37ca2f4db03f7018fad062adbe8801f1c96d77af9c10d245e97e0a99d and it turned out that sessions file storage very quickly grew out of hand because no SESSION_LIFE_TIME or GC_INTERVAL_TIME was set.
|
@metalmatze Would be fairly simple to add pprof-http-service just like with prometheus, though would obviously need to be locked down 😛 |
Yes. I now tried to find something on my local system, but I'm not able to. |
@jmn so this is only a configuration problem? |
I started to add pprof to gitea yesterday and will continue to make a PR today evening. I would really like you to check gitea with pprof after a day running or so. I will do the same. |
[OFF-TOPIC] Nice chart @jmn, what monitoring tools are your using? |
I think so yes. However, I think it would be good to try and provide default values and recommendations which try to prevent users from shooting themselves in the foot. E.g. not unlimited session lifetime with memory storage as default. |
I will move this to v1.2 since no further information here. |
It is not only the case for memory provider |
And to clarify we have a lot of AdminAPI calls and access to git via ssh. Nobody really uses web admin. The question is why sessions are needed at all? |
@DrMegavolt That would be a separate issue (even though slightly related). Please create one so we can track them separetely 🙂 |
Maybe related with #4450 ? |
I'm closing issue currently, please reopen if it is still a problem in latest version |
Running with Docker and Mysql I seem to have a similar issue, both on 1.9.3 and the "latest" image. Might have been there before, but I didn't notice. |
Just installed built and installed 1.11.5 on Rasbian Pi3. All memory is immediately used. No sessions in process. Just one user account added, no repositories. Postgres on the backend.psql (PostgreSQL) 11.7 (Raspbian 11.7-0+deb10u1) top - 13:20:46 up 5 days, 44 min, 1 user, load average: 0.00, 0.03, 0.00 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
I confirm gitea took 380Mb of memory without doing anything ! |
330M mem usage for fresh install
600M mem usage after first push.
admin-usage
|
If you really want to investigate:
and it's Then compare between the two. |
[x]
):Description
I am since yesterday measuring memory usage on Gitea running with no user activity and here is a graph showing memory usage and the memory usage is growing what I view as quite heavily over time. Perhaps all is in order, perhaps I have not configured something correctly.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41307699-gitea-growing-memory-usage-when-unused?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered: