简体   繁体   中英

FlyWay not picking up JVM memory settings

I am using Flyway to deploy to 300!!! Databases. What I've done is created a cmd file that has the flyway command - 1 line each for each of the 300 databases.

Like this:
flyway -configFile= -url= migrate.

There are 300 such lines in the cmd file and its works great when the execution is sequential - obviously it also takes more time.

If I want to run it in Parallel i'll have to add 'start' at the beginning of the command like so:

start flyway -configFile= <conf file path> -url=<DB URL> migrate

The problem am facing with this approach is - after migration on about 100 DB's the Microsoft-Windows-Resource-Exhaustion-Detector detects a Low Virtual Memory condition. Now I know how to set the JVM memory and have tried various options but I don't think it's making any difference at all. I think FlyWay is completely ignoring the JVM settings.

I've 16GB physical memory on the Windows server(6-bit) where Flyway is being executed. When the parallel run happens - I've checked in the Task Manager and the usage doesn't go beyond 3 GB. JRE version is 64 bit. I set _Java_Options. I also tried setting the JVM memory in Java Control panel but nothing seems to work.

Thank you

You will need to limit the number of migrations you run in parallel. From your description it appears you are trying to run 300 which is using too much RAM. Try 10 in parallel and work up from there.

See this question Best strategy to run multiple flyway migration in parallel for a linux based approach. Installing git for windows with git bash is a convenient way to get linux tools to try this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM