We are using play framework with java and use evolutions for the regular schema changes. Usually evolutions are working great but, sometimes when an evolutions script is heavy (ex: doing an alter statement on a table with around 5M records) they are getting stuck in applying_up. There were no issues to the script and all the intended changes are already applied to the tables. play_evolutions table do not have anything stated in last_problem column.
I know the code is responsible to update the status, but based on the situation it seems like the database changes are applying properly but somehow it is failing to communicate with the java thread and java was not able to update the status. I have checked the wait_timeout, interactive_timeout and they are 28800 seconds which is more than the actual query is taking.
Please provide any suggestion on how can we tackle this. Thanks
Setup: play framework with Java
Database: MySQL RDS
Play version: 2.8.18 (this is irrelevant since the issue is there for earlier versions too)
mysql-connector: 8.0.30
With your update script weighing 5M, your problem looks like what is described in the last paragraph of Managing database evolutions, named Evolution storage and limitations :