Gitea: Gitea crash when indexer is run (database error, data too long for column language)

Created on 2 Oct 2020  路  2Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): Gitea version 1.12.5 built with GNU Make 4.1, go1.14.9 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.28.0
  • Operating system: Ubuntu 18.04.5 LTS
  • Database (use [x]):

    • [ ] PostgreSQL

    • [x] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [x] No

    • [ ] Not relevant

  • Log gist:
./gitea.log:2562:2020/10/02 09:12:07 ...dexer/stats/queue.go:24:handle() [E] stats queue indexer.Index(24) failed: Error 1406: Data too long for column 'language' at row 1

Description

I've upgraded Gitea today the usual way by stopping the service, replacing binary and starting the service again. (From 1.12.4 to 1.12.5)

Gitea crashes when indexer runs. I have no idea why this happened. Maybe failed database migration on my end? That's the only relevant log I could find above.

I've disabled repo indexer and things started working again.

kinbug revieweduplicate

Most helpful comment

Maybe we could add a doctor or fix sub command gitea doctor fix 12379 which is backportable.

All 2 comments

This is a duplicate of #12379

You will need to run the following SQL on the database:

ALTER TABLE language_stat MODIFY COLUMN language VARCHAR(50)

This is fixed in 1.13 with a migration using #12396, (with additional fixes in #12427, #12445) but migrations are not backportable.

Maybe we could add a doctor or fix sub command gitea doctor fix 12379 which is backportable.

Was this page helpful?
0 / 5 - 0 ratings