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 @@ ...@@ -208,6 +208,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.iam.external.server.ApiIamServerApplication</mainClass> <mainClass>fr.gouv.vitamui.iam.external.server.ApiIamServerApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- 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 @@ ...@@ -281,8 +281,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.iam.internal.server.ApiIamServerApplication</mainClass> <mainClass>fr.gouv.vitamui.iam.internal.server.ApiIamServerApplication</mainClass>
<jvmArguments> -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam <jvmArguments>-Xmx512m -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam</jvmArguments>
</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- 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 @@ ...@@ -210,6 +210,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.referential.external.server.ApiReferentialServerApplication</mainClass> <mainClass>fr.gouv.vitamui.referential.external.server.ApiReferentialServerApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- 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 @@ ...@@ -285,7 +285,7 @@
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.referential.internal.server.ApiReferentialServerApplication</mainClass> <mainClass>fr.gouv.vitamui.referential.internal.server.ApiReferentialServerApplication</mainClass>
<jvmArguments> <jvmArguments>
-Dvitam.config.folder=${basedir}/src/main/config/dev-vitam -Xmx512m -Dvitam.config.folder=${basedir}/src/main/config/dev-vitam
</jvmArguments> </jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
......
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.security.server.ApiSecurityServerApplication</mainClass> <mainClass>fr.gouv.vitamui.security.server.ApiSecurityServerApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
...@@ -1154,7 +1154,7 @@ ...@@ -1154,7 +1154,7 @@
<artifactId>maven-project-info-reports-plugin</artifactId> <artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven.project.info.reports.plugin.version}</version> <version>${maven.project.info.reports.plugin.version}</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
...@@ -1241,6 +1241,7 @@ ...@@ -1241,6 +1241,7 @@
<version>${spring.boot.version}</version> <version>${spring.boot.version}</version>
<configuration> <configuration>
<addResources>false</addResources> <addResources>false</addResources>
<jvmArguments>-Xmx512m</jvmArguments>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
......
...@@ -50,7 +50,7 @@ function start_api() { ...@@ -50,7 +50,7 @@ function start_api() {
launch "../api/api-iam/iam-external" "$SPRINGBOOT" launch "../api/api-iam/iam-external" "$SPRINGBOOT"
# Start Cas Server # 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() { function start_ui_prod() {
...@@ -107,15 +107,19 @@ echo ...@@ -107,15 +107,19 @@ echo
;; ;;
"back") "back")
start_api start_api
sleep 15
start_ui_back_dev start_ui_back_dev
;; ;;
"front") "front")
start_api start_api
sleep 15
start_ui_back_dev start_ui_back_dev
sleep 15
start_ui_front_dev start_ui_front_dev
;; ;;
*) *)
start_api start_api
sleep 15
start_ui_prod start_ui_prod
;; ;;
esac esac
......
...@@ -185,6 +185,7 @@ ...@@ -185,6 +185,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.identity.IdentityApplication</mainClass> <mainClass>fr.gouv.vitamui.identity.IdentityApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- 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 @@ ...@@ -173,6 +173,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.portal.PortalApplication</mainClass> <mainClass>fr.gouv.vitamui.portal.PortalApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- 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 @@ ...@@ -173,6 +173,7 @@
<executable>true</executable> <executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests --> <attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.referential.ReferentialApplication</mainClass> <mainClass>fr.gouv.vitamui.referential.ReferentialApplication</mainClass>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments> <arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run --> <!-- 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 --> <!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
...@@ -224,7 +225,7 @@ ...@@ -224,7 +225,7 @@
<arguments>run copy-scss:vitamui-library</arguments> <arguments>run copy-scss:vitamui-library</arguments>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
<id>npm run build</id> <id>npm run build</id>
<goals> <goals>
......
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