-
-
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
Failed migration v67 remove stale watches
causes Gitea to not start
#5848
Comments
Can you check contents of gitea.log file, it should contain error where it fails |
I checked the |
Hmm is this an sqlite database? I wonder if you're hitting a deadlock somehow |
Well, if migrating to different type of database is a possible solution I am down for it. However, I don't know would I do such a thing. |
@KubqoA What was the version before the migration? |
The logs you've printed refer to migration v67.go. the final log appears to be due to a select on the repository table and is probably this line: gitea/models/migrations/v67.go Line 92 in d9b51a7
Which probably shouldn't be |
So the issue is in that migration file? |
It is the exact line @zeripath demonstrated. |
So should I create a pull request so this can get fixed? |
Yup. You're hitting an SQL deadlock in the v67 migration. I recently did a check up of the rest of the codebase looking for deadlocks but skipped the migrations coz I assumed incorrectly that these would have been caught already. Clearly I need to check them aswell. In your case this should be a very easy fix - although I won't be able to make a PR for several hours possibly not till Saturday so if someone else could do it I can lgtm it. The simplest way to prevent deadlocks is to ensure that all dependent db queries are done within the same transaction. (You can be a bit cleverer but it will almost always bite you later.) |
@KubqoA That would be nice 😄 |
Created the pull request @zeripath |
Is this why upgrading to |
@NetOperatorWibby without more information from you I couldn't possibly comment |
remove stale watches
causes Gitea to not start
[x]
):Description
I am running mailcow with gitea so I can authenticate users using their mail account. Yesterday I updated my mailcow stack and also Gitea with it. Since then Gitea doesn't launch. I tried to debug it and it looks like it gets stuck when it tries to run migration
remove stale watches
. If I specify another database file in myapp.ini
, so that Gitea creates a new one, everything seems to work and Gitea loads without any problems. However this means that I'd lose all my data, which is not a very good solution.The text was updated successfully, but these errors were encountered: