简体   繁体   English

FlyWay 没有选择 JVM 内存设置

[英]FlyWay not picking up JVM memory settings

I am using Flyway to deploy to 300!!!我正在使用 Flyway 部署到 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.我所做的是创建了一个 cmd 文件,其中包含 flyway 命令 - 300 个数据库中的每一个都有 1 行。

Like this:像这样:
flyway -configFile= -url= migrate. flyway -configFile= -url= 迁移。

There are 300 such lines in the cmd file and its works great when the execution is sequential - obviously it also takes more time. cmd 文件中有 300 行这样的行,并且在按顺序执行时效果很好 - 显然它也需要更多时间。

If I want to run it in Parallel i'll have to add 'start' at the beginning of the command like so:如果我想并行运行它,我必须在命令的开头添加“start”,如下所示:

start flyway -configFile= <conf file path> -url=<DB URL> migrate start flyway -configFile= <conf 文件路径> -url=<DB URL> 迁移

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.这种方法面临的问题是 - 在大约 100 个 DB 上迁移后,Microsoft-Windows-Resource-Exhaustion-Detector 检测到低虚拟内存条件。 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.现在我知道如何设置 JVM 内存并尝试了各种选项,但我认为它根本没有任何区别。 I think FlyWay is completely ignoring the JVM settings.我认为 FlyWay 完全忽略了 JVM 设置。

I've 16GB physical memory on the Windows server(6-bit) where Flyway is being executed.我在执行 Flyway 的 Windows 服务器(6 位)上有 16GB 物理内存。 When the parallel run happens - I've checked in the Task Manager and the usage doesn't go beyond 3 GB.当并行运行发生时 - 我已经检查了任务管理器并且使用量没有超过 3 GB。 JRE version is 64 bit. JRE 版本是 64 位。 I set _Java_Options.我设置了_Java_Options。 I also tried setting the JVM memory in Java Control panel but nothing seems to work.我还尝试在 Java 控制面板中设置 JVM 内存,但似乎没有任何效果。

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.从您的描述看来,您正在尝试运行 300,它使用了过多的 RAM。 Try 10 in parallel and work up from there.并行尝试 10 个并从那里开始工作。

See this question Best strategy to run multiple flyway migration in parallel for a linux based approach.请参阅此问题针对基于 linux 的方法并行运行多个路迁移的最佳策略 Installing git for windows with git bash is a convenient way to get linux tools to try this.使用 git bash 为 windows 安装 git 是一种让 linux 工具尝试此操作的便捷方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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