Unverified Commit 24014420 authored by Makhtar DIAGNE's avatar Makhtar DIAGNE Committed by GitHub
Browse files

Limitation de la mémoire utilisée par les services SpringBoot sur la machine de dev (#52)



* [TECH] Limit max memory for services launched by Springboot plugin

* [TECH] PR review

Co-authored-by: default avatarEmmanuel Deviller <emmanuel.deviller@xelians.fr>
Co-authored-by: default avatarMakhtar DIAGNE <makhtar.diagne@teamdlab.com>
parent f452a65d
......@@ -208,6 +208,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.iam.external.server.ApiIamServerApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -281,8 +281,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.iam.internal.server.ApiIamServerApplication</mainClass>
<jvmArguments> -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam
</jvmArguments>
<jvmArguments>-Xmx512m -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -210,6 +210,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.referential.external.server.ApiReferentialServerApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -285,7 +285,7 @@
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.referential.internal.server.ApiReferentialServerApplication</mainClass>
<jvmArguments>
-Dvitam.config.folder=${basedir}/src/main/config/dev-vitam
-Xmx512m -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam
</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
......
......@@ -155,6 +155,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.security.server.ApiSecurityServerApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -1241,6 +1241,7 @@
<version>${spring.boot.version}</version>
<configuration>
<addResources>false</addResources>
<jvmArguments>-Xmx512m</jvmArguments>
</configuration>
</plugin>
<plugin>
......
......@@ -50,7 +50,7 @@ function start_api() {
launch "../api/api-iam/iam-external" "$SPRINGBOOT"
# Start Cas Server
launch "../cas/cas-server" "java -Dspring.config.additional-location=src/main/config/cas-server-application-dev.yml -jar target/cas-server.war"
launch "../cas/cas-server" "java -Xmx512m -Dspring.config.additional-location=src/main/config/cas-server-application-dev.yml -jar target/cas-server.war"
}
function start_ui_prod() {
......@@ -107,15 +107,19 @@ echo
;;
"back")
start_api
sleep 15
start_ui_back_dev
;;
"front")
start_api
sleep 15
start_ui_back_dev
sleep 15
start_ui_front_dev
;;
*)
start_api
sleep 15
start_ui_prod
;;
esac
......
......@@ -185,6 +185,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.identity.IdentityApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -173,6 +173,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.portal.PortalApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -173,6 +173,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.referential.ReferentialApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment