MySQL database migration failed for upgrade to Gitea v1.12.0 #5599

Closed
opened 2025-11-02 06:30:26 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @lammel on GitHub (Jun 20, 2020).

  • Gitea version (or commit ref): v1.12
  • Operating system: Debian Buster
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

After upgrading from Gitea v1.11.6 to v1.12.0 a fatal error occured for the database migrations being performed during startup.

2020/06/20 10:11:28 ...es/setting/mailer.go:131:newNotifyMailService() [I] Notify Mail Service Enabled
2020/06/20 10:11:28 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: mail Starting
2020/06/20 10:11:28 ...ue/queue_bytefifo.go:95:Run() [D] level: mail-level Starting
2020/06/20 10:11:28 routers/init.go:64:initDBEngine() [I] Beginning ORM engine initialization.
2020/06/20 10:11:28 routers/init.go:71:initDBEngine() [I] ORM engine initialization attempt #1/10...
2020/06/20 10:11:28 ...rm/session_schema.go:25:Ping() [I] PING DATABASE mysql
2020/06/20 10:11:28 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: notification-service Starting
2020/06/20 10:11:28 ...ue/queue_bytefifo.go:95:Run() [D] level: notification-service-level Starting
2020/06/20 10:11:28 ...ations/migrations.go:300:Migrate() [I] Migration[121]: add is_restricted column for users table
2020/06/20 10:11:28 routers/init.go:77:initDBEngine() [E] ORM engine initialization attempt #1/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
2020/06/20 10:11:28 routers/init.go:78:initDBEngine() [I] Backing off for 5 seconds
...
2020/06/20 10:12:14 routers/init.go:71:initDBEngine() [I] ORM engine initialization attempt #10/10...
2020/06/20 10:12:14 ...rm/session_schema.go:25:Ping() [I] PING DATABASE mysql
2020/06/20 10:12:14 ...ations/migrations.go:300:Migrate() [I] Migration[121]: add is_restricted column for users table
2020/06/20 10:12:14 routers/init.go:138:GlobalInit() [F] ORM engine initialization failed: 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

Gitea is not usable after the fatal error of course.
Reverting back to the previous running Gitea v1.11.6 immediately works.

So it seems for MySQL a rowsize limit is exceeded in the users table (just guessing).

Originally created by @lammel on GitHub (Jun 20, 2020). - Gitea version (or commit ref): v1.12 - Operating system: Debian Buster - Database: - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description After upgrading from Gitea v1.11.6 to v1.12.0 a fatal error occured for the database migrations being performed during startup. ``` 2020/06/20 10:11:28 ...es/setting/mailer.go:131:newNotifyMailService() [I] Notify Mail Service Enabled 2020/06/20 10:11:28 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: mail Starting 2020/06/20 10:11:28 ...ue/queue_bytefifo.go:95:Run() [D] level: mail-level Starting 2020/06/20 10:11:28 routers/init.go:64:initDBEngine() [I] Beginning ORM engine initialization. 2020/06/20 10:11:28 routers/init.go:71:initDBEngine() [I] ORM engine initialization attempt #1/10... 2020/06/20 10:11:28 ...rm/session_schema.go:25:Ping() [I] PING DATABASE mysql 2020/06/20 10:11:28 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: notification-service Starting 2020/06/20 10:11:28 ...ue/queue_bytefifo.go:95:Run() [D] level: notification-service-level Starting 2020/06/20 10:11:28 ...ations/migrations.go:300:Migrate() [I] Migration[121]: add is_restricted column for users table 2020/06/20 10:11:28 routers/init.go:77:initDBEngine() [E] ORM engine initialization attempt #1/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 2020/06/20 10:11:28 routers/init.go:78:initDBEngine() [I] Backing off for 5 seconds ... 2020/06/20 10:12:14 routers/init.go:71:initDBEngine() [I] ORM engine initialization attempt #10/10... 2020/06/20 10:12:14 ...rm/session_schema.go:25:Ping() [I] PING DATABASE mysql 2020/06/20 10:12:14 ...ations/migrations.go:300:Migrate() [I] Migration[121]: add is_restricted column for users table 2020/06/20 10:12:14 routers/init.go:138:GlobalInit() [F] ORM engine initialization failed: 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 ``` Gitea is not usable after the fatal error of course. Reverting back to the previous running Gitea v1.11.6 immediately works. So it seems for MySQL a rowsize limit is exceeded in the users table (just guessing).
GiteaMirror added the issue/duplicate label 2025-11-02 06:30:26 -06:00
Author
Owner

@lammel commented on GitHub (Jun 20, 2020):

Might be related to #11976, but the error description there indicates another issue.

@lammel commented on GitHub (Jun 20, 2020): Might be related to #11976, but the error description there indicates another issue.
Author
Owner

@zeripath commented on GitHub (Jun 20, 2020):

This is a duplicate of #9347 and #11984.

@zeripath commented on GitHub (Jun 20, 2020): This is a duplicate of #9347 and #11984.
Author
Owner

@zeripath commented on GitHub (Jun 20, 2020):

The issue in #11976 appears unrelated.

@zeripath commented on GitHub (Jun 20, 2020): The issue in #11976 appears unrelated.
Author
Owner

@lammel commented on GitHub (Jun 20, 2020):

As pointed out in #9347, I just run gitea convert (see https://docs.gitea.io/en-us/command-line/#convert) and am up and running with v1.12.

root@bit:/opt/gitea/bin# ./gitea --config /etc/gitea/app.ini convert
2020/06/20 11:32:35 ...dules/setting/git.go:93:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled
2020/06/20 11:32:35 cmd/convert.go:30:runConvert() [T] AppPath: /opt/gitea/bin/gitea
2020/06/20 11:32:35 cmd/convert.go:31:runConvert() [T] AppWorkPath: /opt/gitea/bin
2020/06/20 11:32:35 cmd/convert.go:32:runConvert() [T] Custom path: /opt/gitea/bin/custom
2020/06/20 11:32:35 cmd/convert.go:33:runConvert() [T] Log path: /var/log/gitea
Converted successfully, please confirm your database's character set is now utf8mb4

Sorry for the duplicate issue and thanks for the quick help.

@lammel commented on GitHub (Jun 20, 2020): As pointed out in #9347, I just run `gitea convert` (see https://docs.gitea.io/en-us/command-line/#convert) and am up and running with v1.12. ``` root@bit:/opt/gitea/bin# ./gitea --config /etc/gitea/app.ini convert 2020/06/20 11:32:35 ...dules/setting/git.go:93:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled 2020/06/20 11:32:35 cmd/convert.go:30:runConvert() [T] AppPath: /opt/gitea/bin/gitea 2020/06/20 11:32:35 cmd/convert.go:31:runConvert() [T] AppWorkPath: /opt/gitea/bin 2020/06/20 11:32:35 cmd/convert.go:32:runConvert() [T] Custom path: /opt/gitea/bin/custom 2020/06/20 11:32:35 cmd/convert.go:33:runConvert() [T] Log path: /var/log/gitea Converted successfully, please confirm your database's character set is now utf8mb4 ``` Sorry for the duplicate issue and thanks for the quick help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5599