linkedin / linkedin/dr-elephant
Cannot start Dr Elephant as Specified key was too long. max key length is 767 bytes [ERROR:1071, SQLSTATE:42000]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 839
- PR merge metrics
- No merged PRs in 30d
Description
Facing this known issue with max key length while starting Dr Elephant.
Did follow the steps in below url to fix it but still facing same issue .
https://github.com/linkedin/dr-elephant/wiki/FAQ#2-specified-key-was-too-long-max-key-length-is-767-bytes-error1071-sqlstate42000
Is there anything else that needs to be done to fix the max key issue ? Anything on mysql to be changed ? I am getting blocked with this at the moment . Any help would be great.
Error:
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[info] play - database [default] connected at jdbc:mysql:///drelephant?characterEncoding=UTF-8
[error] play - Specified key was too long; max key length is 767 bytes [ERROR:1071, SQLSTATE:42000]
Oops, cannot start the server.
@77l6c33ba: Database 'default' is in an inconsistent state!
at play.api.db.evolutions.Evolutions$.checkEvolutionsState(Evolutions.scala:193)
at play.api.db.evolutions.Evolutions$.databaseEvolutions(Evolutions.scala:348)
at play.api.db.evolutions.Evolutions$$anonfun$evolutionScript$2.apply(Evolutions.scala:313)
at play.api.db.evolutions.Evolutions$$anonfun$evolutionScript$2.apply(Evolutions.scala:311)
at scala.Option.map(Option.scala:145)
at play.api.db.evolutions.Evolutions$.evolutionScript(Evolutions.scala:311)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:462)
at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:507)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:461)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:459)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:459)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:87)
at play.core.StaticApplication.(ApplicationProvider.scala:52)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:274)
at play.core.server.NettyServer.main(NettyServer.scala)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked FAQ and the MySQL connection details in the issue, then trace the Play database-evolution startup path shown in the stack trace. Confirm what database configuration or evolution condition causes the 767-byte key error; done means Dr. Elephant starts without leaving the database in an inconsistent state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql, scala
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100