java - 在 Spot 实例上增加节点大小时如何修复堆空间?
问题描述
我们一直使用 EC2 Windows 现货实例作为 Jenkins 从属服务器,但是,当将大小从 M5d2XLarge 增加到 M5d4XLarge 时(试图克服某些构建中的内存问题),这些实例无法创建。
我试图将 Java Opts Xms 和 Xmx 设置为 init 脚本的一部分,但是,错误没有改变。我读过 WinRM 可能是问题所在,但我很难将其与节点大小的增加联系起来。
这是预期的日志结果(来自 M5d2XLarge)
WinRM service responded. Waiting for WinRM service to stabilize on EC2 (Dev-US-East-1) - Windows Server 2019 Docker (i-xxxxxxxxxx)
WinRM should now be ok on EC2 (Dev-US-East-1) - Windows Server 2019 Docker (i-xxxxxxxxxx)
Connected with WinRM.
Creating tmp directory if it does not exist
Executing init script
C:\Users\Administrator>if not exist C:\Jenkins mkdir C:\Jenkins
init script ran successfully
remoting.jar sent remotely. Bootstrapping it
Launching via WinRM:java -jar C:\Windows\Temp\remoting.jar -workDir C:\Jenkins
Both error and output logs will be printed to C:\Jenkins\remoting
但是,在“通过 WinRM 启动”之后,由于垃圾收集器问题(来自 M5d4XLarge)而失败:
init script ran successfully remoting.jar sent remotely. Bootstrapping it
Launching via WinRM:java -jar C:\Windows\Temp\remoting.jar -workDir C:\Jenkins
Error occurred during initialization of VM
Unable to allocate 512384KB bitmaps for parallel garbage collection for the requested 16396288KB heap.
Ouch:
java.io.EOFException: unexpected stream termination
解决方案
尝试更新运行remoting.jar
. 将运行 jar 的这一行修改为
java -Xmx1024m -jar C:\Windows\Temp\remoting.jar -workDir C:\Jenkins
推荐阅读
- python - 如何抽象两个相似的功能
- excel - 根据某些条件填充表
- python - 如何使用 matplotlib 转换 nd 数组以绘制特征重要性
- nlp - 用 spacy 找到名词块的根的 POS
- node.js - 不和谐.js | 随机小狗嵌入不起作用
- php - 链接到 wordpress 中的 archive.php
- java - 使用 JdbcTemplate 和 T-SQL 检查 SQL DB 中是否存在表
- python - 使用 QColorDialog 为未确定数量的按钮设置 QPushButton 的颜色
- scala - Typesafe Config:用于单元测试目的的覆盖值
- python - Python:计算唯一匹配的总数