STATIC 서비스 로그에 "Out of memory"가 발생할 경우 서비스의 메모리 용량을 변경시켜 주어야 합니다.


해결 방안


  1. STATIC Launcher 설치 경로로 이동합니다.

  2. resources → services.json 을 텍스트 편집기를 사용하여 오픈합니다.

  3. Ctrl+F로 문제가 발생된 서비스를 검색합니다.

  4. "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"**  
          ]
    },
    ...
    
  5. STATIC Launcher Shell을 실행합니다.

  6. 해당 서비스를 STOPUNINSTALLINSTALLSTART를 진행합니다.

    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
    
    build.gradle
        
    plugins {
    id 'java'
    id 'org.springframework.boot' version '3.0.4'
    id 'io.spring.dependency-management' version '1.1.0'
    }
    
    apply plugin: 'maven-publish'
    publishing {
    publications {
    	maven(MavenPublication) {
    		groupId 'com.scm'
    		artifactId 'module'
    		version '0.0.1-SNAPSHOT'
    		from components.java
    	}
    }
    }
    
    group = 'com.scm'
    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = '19'
    targetCompatibility = '19'
    
    configurations {
    compileOnly {
    	extendsFrom annotationProcessor
    }
    }
      
      repositories {
      	mavenCentral()
      }
    
    dependencies {
    //..
    }