[GH-ISSUE #986] Index column size too large #703

Closed
opened 2026-03-03 02:02:22 +03:00 by kerem · 5 comments
Owner

Originally created by @okami-chen on GitHub (May 7, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/986

Subject of the issue

Your environment

  • Bitwarden_rs version:
  • Install method:
  • Clients used:
  • Reverse proxy and version:
  • Version of mysql/postgresql:
  • Other relevant information:

Steps to reproduce

Expected behaviour

Actual behaviour

Relevant logs


Running migration 20180114171611
Executing migration script 20180114171611/up.sql
[2020-05-07 23:19:47][panic][ERROR] thread 'main' panicked at 'Can't run migrations: QueryError(DatabaseError(__Unknown, "Index column size too large. The maximum column size is 767 bytes."))': src/main.rs:336
   0: bitwarden_rs::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   2: rust_begin_unwind
             at src/libstd/panicking.rs:378
   3: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   4: core::option::expect_none_failed
             at src/libcore/option.rs:1211
   5: bitwarden_rs::migrations::run_migrations
   6: bitwarden_rs::main
   7: std::rt::lang_start::{{closure}}
   8: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
      std::panicking::try::do_call
             at src/libstd/panicking.rs:303
   9: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:86
  10: std::panicking::try
             at src/libstd/panicking.rs:281
      std::panic::catch_unwind
             at src/libstd/panic.rs:394
      std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  11: main
  12: __libc_start_main
  13: <unknown>
Originally created by @okami-chen on GitHub (May 7, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/986 <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unneccessary for your issue, feel free to remove them. Remember to hide/obfuscate personal and confidential information, such as names, global IP/DNS adresses and especially passwords, if neccessary. --> ### Subject of the issue <!-- Describe your issue here.--> ### Your environment <!-- The version number, obtained from the logs or the admin page --> * Bitwarden_rs version: <!-- How the server was installed: Docker image / package / built from source --> * Install method: * Clients used: <!-- if applicable --> * Reverse proxy and version: <!-- if applicable --> * Version of mysql/postgresql: <!-- if applicable --> * Other relevant information: ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start bitwarden_rs? --> ### Expected behaviour <!-- Tell us what should happen --> ### Actual behaviour <!-- Tell us what happens instead --> ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. --> ```php Running migration 20180114171611 Executing migration script 20180114171611/up.sql [2020-05-07 23:19:47][panic][ERROR] thread 'main' panicked at 'Can't run migrations: QueryError(DatabaseError(__Unknown, "Index column size too large. The maximum column size is 767 bytes."))': src/main.rs:336 0: bitwarden_rs::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:474 2: rust_begin_unwind at src/libstd/panicking.rs:378 3: core::panicking::panic_fmt at src/libcore/panicking.rs:85 4: core::option::expect_none_failed at src/libcore/option.rs:1211 5: bitwarden_rs::migrations::run_migrations 6: bitwarden_rs::main 7: std::rt::lang_start::{{closure}} 8: std::rt::lang_start_internal::{{closure}} at src/libstd/rt.rs:52 std::panicking::try::do_call at src/libstd/panicking.rs:303 9: __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:86 10: std::panicking::try at src/libstd/panicking.rs:281 std::panic::catch_unwind at src/libstd/panic.rs:394 std::rt::lang_start_internal at src/libstd/rt.rs:51 11: main 12: __libc_start_main 13: <unknown> ```
kerem closed this issue 2026-03-03 02:02:22 +03:00
Author
Owner

@okami-chen commented on GitHub (May 7, 2020):

where is 20180114171611/up.sql

<!-- gh-comment-id:625320853 --> @okami-chen commented on GitHub (May 7, 2020): where is `20180114171611/up.sql`
Author
Owner

@dani-garcia commented on GitHub (May 7, 2020):

You didn't specify database, so I'm gonna assume MySQL, because I've never heard about the error in SQLite, that file would be this one probably: https://github.com/dani-garcia/bitwarden_rs/blob/master/migrations/mysql/2018-01-14-171611_create_tables/up.sql

The error you get The maximum column size is 767 bytes. should probably require some changes to the database, which seems to have some maximum size for columns. Searching for that error gets some hits in Google with solutions, so I'd try those.

<!-- gh-comment-id:625384334 --> @dani-garcia commented on GitHub (May 7, 2020): You didn't specify database, so I'm gonna assume MySQL, because I've never heard about the error in SQLite, that file would be this one probably: https://github.com/dani-garcia/bitwarden_rs/blob/master/migrations/mysql/2018-01-14-171611_create_tables/up.sql The error you get `The maximum column size is 767 bytes.` should probably require some changes to the database, which seems to have some maximum size for columns. Searching for that error gets some hits in Google with solutions, so I'd try those.
Author
Owner

@BlackDex commented on GitHub (Oct 8, 2020):

@okami-chen, did you got it working?

<!-- gh-comment-id:705861656 --> @BlackDex commented on GitHub (Oct 8, 2020): @okami-chen, did you got it working?
Author
Owner

@okami-chen commented on GitHub (Oct 9, 2020):

@okami-chen, did you got it working?

yes

<!-- gh-comment-id:705920342 --> @okami-chen commented on GitHub (Oct 9, 2020): > @okami-chen, did you got it working? yes
Author
Owner

@BlackDex commented on GitHub (Oct 9, 2020):

Great ☺️

<!-- gh-comment-id:705976700 --> @BlackDex commented on GitHub (Oct 9, 2020): Great ☺️
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#703
No description provided.