如果STATIC服务日志出现“Out of memory”,则需要更改服务的内存容量。
移动至 STATIC Launcher 安装路径。
使用文本编辑器打开resources → services.json。
通过快捷键Ctrl+F查找发生问题的服务。
"javaOptions
" 选项中将 "Xmx2048m"更改为希望的内存量并储存。
ex. 如果您想将 STATIC 服务内存容量更改为 4GB
更改前
...
{
"name": "defect", **>> 服务名**
"instanceId": "defect",
"type": "SPRINGBOOT",
"archive": "defect-service.jar",
"javaOptions": [
**"-Xmx2048m" >> 需要更改的部分**
]
},
...
=>
更改后
...
{
"name": "defect", **>> 服务名**
"instanceId": "defect",
"type": "SPRINGBOOT",
"archive": "defect-service.jar",
"javaOptions": [
**"-Xmx4096m"**
]
},
...
运行STATIC Launcher Shell
。
将此服务按照 STOP
→ UNINSTALL
→ INSTALL
→ START
进行。
stop {service name}
uninstall {service name}
install ... -> 请参阅下面命令中要更改的服务的命令
start {service name}
install toolbox resources/services.json resources/toolbox-service.zip --zip
install mongo-db resources/services.json resources/mongodb-win32-x86_64-2008plus-ssl-4.0.3.zip --zip
install account resources/services.json resources/auth-service-0.0.1-SNAPSHOT.jar
install project resources/services.json resources/Project-0.0.1-SNAPSHOT.jar
install revision resources/services.json resources/Revision-0.0.1-SNAPSHOT.jar
install filter resources/services.json resources/filter-service.jar
install source resources/services.json resources/Source-0.0.1-SNAPSHOT.jar
install defect resources/services.json resources/defect-service.jar
install metric resources/services.json resources/metric-service.jar
install rule resources/services.json resources/rule-service-0.0.1-SNAPSHOT.jar
install analysis resources/services.json resources/Analysis-0.0.1-SNAPSHOT.jar
install web-ui resources/services.json resources/web-ui.zip --zip
install fixreference resources/services.json resources/fixreference-service.jar
install report resources/services.json resources/report-service.jar
install notification resources/services.json resources/notification-0.0.1-SNAPSHOT.jar
😀 服务内存容量更改示例 ( 📢 示例)
***ex. metric service 内存容量更改***
1. Execute launcher shell
2. stop
static >> stop metric
3. uninstall
static >> uninstall metric
4, install
static >> install metric resources/services.json resources/metric-service.jar
5. start
static >> start metric