-
-
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
ORM engine initialization Error: migrate: Row size too large #9347
Comments
What version of MySQL are you running? |
gitea database collation: I remember there being a similar issue in Nextcloud before, requiring changing the table row format to edit: This worked for me. Manually changing the row format and character set of each table:
Adapted from: https://docs.nextcloud.com/server/11/admin_manual/maintenance/mysql_4byte_support.html#mariadb-support |
@zeripath Why did you close this issue? I only described a manual workaround, the issue persists This should be part of the database migration / maintenance script of gitea (see Nextcloud example). Apparently gitea requires a certain row format which is not explicitly specified during table creation. Some more info: The mariadb defaults have changed in 10.2.2 and gitea required the newer values. However, previously existing tables need to be converted manually. |
As far as I could see the issue is specific to old versions of MariaDB. I'm but certain there's really any way we can go about detecting this. |
The issue is independent of the MariaDB version in a sense that upgrading the database doesn't help. Specific MariaDB default configurations are required and tables which existed before need to be converted manually.
Only now (after I know the problem and workaround) I found the convert command: The MySQL default charset could be changed to |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
I just had the same issue upgrading from Gitea 1.10.2 to 1.11.1 with MariaDB version 10.3.22 This should really be part of the automatic upgrade process. Thanks to @Whisprin for the SQL commands, they worked for me. |
This should be added to the docs and maybe the check could be in doctor command first and if stable move to the web startup process. |
We could also add a function (step independent) to the migration function that attempts to create row with a deliberately big length, then delete it. If that fails, we could abort the process, warn the user and point them to the docs. |
I upgraded from 1.6 to 1.11 and am having this issue. I tried running the manual fix as suggested above, but I'm still seeing the same error.
|
@leetNightshade Can I suggest looking at these answers from SO? |
"Variable 'innodb_file_format' is a read only variable." Those answers aren't helpful to someone who doesn't know what they're doing. Gitea created this problem, why aren't you guys solving it? |
@leetNightshade what version of MySql do you run? |
@leetNightshade I'm sorry you didn't find that link useful. Unfortunately that's a limitation of MySQL/MariaDB. AFAICT the problem you are facing is very common for databases created with old versions of those products. "Modern" versions of MySQL/MariaDB don't have this problem. What you need to do is to upgrade your engine and look for a way of converting your tables to a newer format. I'd suggest you perform a backup and upgrade to the latest database engine version possible (e.g. MariaDB 10.4.12). You can then export your database with |
I'm running: mariadb Ver 15.1 Distrib 10.4.12-MariaDB, for Linux (x86_64) using readline 5.1 |
@leetNightshade just try what guillep2k suggested and the try it again - would be nice if you can tell us the result |
Nice! 😄. The original poster had one, but I didn't know what you had. So, you need to stop Gitea (make sure no gitea processes keep running, even if it seems to have stopped), and export/transform/re-import the database (assuming your database name is
You will be prompted for the root user's password two times. The |
That did the trick, thank you @guillep2k !! |
So we can finally close this issue - which is a fault with MySQL not Gitea - I guess we should put this little script in the FAQ. |
It's not a fault with MySQL, it works as intended. It's a fault of how Gitea is using MySQL and a missing migration. If you need ROW_FORMAT=DYNAMIC specify it explicitly during table creation or at least please mention it in the documentation that dynamic is the expected row format. @zeripath @lunny |
I created PR to set that for new installations and new tables. Existing tables won't be fixed and @guillep2k script should be used instead. |
Migration is not really possible to implement as it requires dumping database and reimport. It would be enough to add that to FAQ as @zeripath suggested imho |
Using ALTER_TABLE the row format can be changed with MySQL built in commands without dumping and reimporting. See comment: #9347 (comment) |
Thanks, @Whisprin, that worked and made my Gitea server usable again! |
Or you could have just used |
did not work for me, neither using |
[x]
):https://gist.github.com/Whisprin/69ec124abec9fb94fbe713e32f5a652a
Description
After upgrading from Gitea v1.9.5 to 1.10.0 I'm getting a database migration error:
ORM engine initialization attempt #8/10 failed. Error: migrate: do migrate: Error 1118: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
The text was updated successfully, but these errors were encountered: