-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Hang with 1.20.2/1.20.3 #26684
Comments
Hm, you are using SQLite for 2.5k users. It's amazing. Maybe you can use MySQL or Postgres.
From this request, it will only do database operations, so the database operation is too slow. Since SQLite is shared read and locked write, it expected very slow when there are many operations at the same time. |
Thanks for the super quick response. Moving the database is certainly something I can look at doing though I'm curious as to why it should only be a problem with 1.20.2 onward. Is there any additional debug or stats I can look at to confirm this is problem before attempting to move everything ? |
According to the code it should be a random event. Even 1.20.1 or previous version should have the same problem. You can have a test to push 10 times at the same time. |
To debug the hanging problem:
About "pprof":
But I would also suggest to use a dedicated database server, SQLite is not suitable for such a large instance, SQLite itself doesn't work for concurrent requests well. |
Many thanks for the responses and suggestions, much appreciated. |
We experience exactly the same behaviour with 1.20.3 (also with a sqlite3 database). We have ~100 users and everything was fine before with 1.19.3. |
Feel free to provide more details, including the diagnosis report and stacktrace. |
For my instance, I was able to get both stacktrace and debug outputs.
Whilst I completely understand the point that sqlite isn't really suited to our usage, we had zero issues for the past 2.5 years and only started getting issues with 1.20.2, something clearly did change in that version to trigger the problem. My intention is to migrate away from sqlite this weekend, and expect that will resolve it for us. |
and just for reference, another slightly different example:
|
Hmm, okay. Nevermind then. |
What's the full stacktrace? Partial information doesn't show the whole picture. |
I will take a look at this problem. |
Output from pprof, and the goroutine-before.txt and goroutine-after.txt are here: https://gist.github.com/sesa-me/7ed3050ae68576f73017c9362cdf7c90 |
Just an update for my instance, I migrated the database to mariadb yesterday and have been happily running 1.20.3 for the past 24hrs. With sqlite, we typically saw it hang within a few hours so migrating looks like it has resolved/worked around the issue for us. |
I can see there seems to be a regression by #26158 |
Great! Thanks a lot for the quick support! 🚀 |
Description
I run a medium sized, public gitea instance, we have approx 2.5k users with 1k repositories (about 6GB in total).
Starting with 1.20.2 we started experiencing an issue where, after some seemingly random period, trying to access repositories appears to hang or deadlock, both via the web interface or via SSH. We've got nothing to correlate when the issue occurs, sometimes it happens within a few minutes of restarting, sometimes hours. When it does occur we still seem able to access the web interface for non repository things (i.e. admin admin pages).
I've confirmed the issue still happens in 1.20.3 but it no longer occurs after rolling back to 1.20.1.
So far, I've not been able to properly narrow down what is causing the hang.
I see some 'slow' requests in the router logs which just seem indicative of the hanging, but nothing else that seems unusual:
On the host, I see a bunch of waiting processes, but I think that is also just showing normal activity that is hung ?
gitea doctor check --all
came back clean and I've also rungitea doctor recreate-table
without any obvious impact.Without seeing a specific error, I'm at a loss as to what else to look for so would appreciate some initial advice or guide on what I can do to get some additional information and narrow down what the root cause would be ?
Gitea Version
1.20.2 & 1.20.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.34.1
Operating System
No response
How are you running Gitea?
We are running gitea downloaded as a binary from https://github.com/go-gitea/gitea/releases as a systemd service under ubuntu 22.04.3. Gitea is proxied by traefik for web connections.
Database
SQLite
The text was updated successfully, but these errors were encountered: