-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Upgrade to 3.0.0 Fails with Max Key Length Error #1358
Comments
In order to fully support emojis, Shlink 3.0.0 changes the charset for some fields from utf8 to utf8mb4, which can potentially increase the size needed to store some characters. Probably some of those fields has or is part of some key that I missed. I'll check which one is it. |
So, I have checked which of the fields getting updated to utf8mb4 have an index, and only the The thing is that those should supposedly be pretty short, however, could it be that for you any of those has a very long value in some of the entries? Also, could you try passing the env var |
Hi and thank you! I check and my longest short code is 20 characters. I can set shell verbosity the next time I attempt the upgrade however need to accommodate for it being down. |
Something I forgot to ask. What MySQL version are you using? |
Sorry, something I should have included. 5.6 |
That might be related. I have read that in versions older than 5.7, the fields which are part of the keys should have a maximum length of 191, otherwise it can throw this error even if there are no value longer than that. Some of the fields I mentioned have a length of 255, so that might be the problem. I'll try to reproduce this with MySQL 5.6 and let you know. |
Confirmed. This happens only with MySQL 5.6 @timothystewart6 I would suggest updating to MySQL 5.7, as 5.6 is no longer actively supported. |
Thank you and sorry. Will migrate soon. I used this version because another old app requires it, missed that Postgres was supported in the docs or I would have just used that. Sorry to waste your time. Thanks for a great product! |
No worries! I'm just glad to know what's the root cause. |
Just reporting back. I ended up moving to Postgres (thanks to your guide on moving instances) and everything is working after the upgrade. I did lost my stats because of an error with max size during the transfer but getting on Postgres was more important than a legacy version of mysql. Thanks again! |
How Shlink is set-up
Summary
Upgrade fails with
Current behavior
Crashloop
Expected behavior
Upgrade, no crashloop
How to reproduce
Upgraded container from 2.10.3 to 3.3.0
The text was updated successfully, but these errors were encountered: